Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Search input and results with dropdown

Hello Team,

I am trying to implement a search and results should be shown as a dropdown, which component or code should I use to get the correct results? I am using Laravel with code below but I see search results on the right side of the pane, how do I get as a dropdown?

    <div class="d-flex align-items-center overflow-auto">
        <!--begin::Search-->
        <div class="position-relative my-1">
            <i class="ki-duotone ki-magnifier fs-3 text-gray-500 position-absolute top-50 translate-middle-y ms-3"><span class="path1"></span><span class="path2"></span></i>
            <input type="text" class="form-control form-control-sm form-control-solid w-150px ps-10"  wire:model.live="key" placeholder="Search...">
        </div>
        <!--end::Search-->
         
        @if(sizeof($results) > 0)
        <div class="menu menu-rounded menu-column menu-gray-600 menu-state-bg fw-semibold w-250px" data-kt-menu="true">
            <!--begin::Menu item-->
            <div class="menu-item" data-kt-menu-trigger="hover" data-kt-menu-placement="right-start">
                <!--begin::Menu link-->
                @foreach ($results as $result)
                <a href="/symbol/cash/{{ $result->symbol }}" class="menu-link py-3">
                    <span class="menu-title">{{ $result->symbol }}</span>
                </a>
                @endforeach
            </div>
        </div>
    @endif
    </div>

Here is link for image which is shown in my view,

https://imgur.com/a/K5YnP7Y

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Jigar Patel

For the items in the top bar, please refer to the structure of other top bar items. Replicate it with an empty dropdown first, and then add your feature. This approach ensures consistency in the layout and functionality of the top bar items.

Thank you


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(