title: How to create a Ajax search box for custom brands block in magento2.4.2
body: <p>I'm having a custom created block for available brands in the site . I need a search box in ajax . can anyone help me?</p>
  <p>Here is the normal dropdown code which I need to change into ajax search.</p>
  <pre><code>&lt;select data-role=&quot;sorter&quot; class=&quot;sorter-options&quot; id=&quot;branddropdown&quot; style=&quot;background-color:white&quot;&gt; 
                  &lt;?php  foreach($allbrands as $brand) {
                  $brand_name = str_replace(' ', '-', $brand['brand_name']);  
                  $brandurl=$block-&gt;getUrl('modelseries',['brand'=&gt;$brand_name]);
                   $brandurl=str_replace(&quot;modelseries/index/index&quot;,&quot;ms&quot;,$brandurl);
                  ?&gt;
                      &lt;option value=&quot;&lt;?php echo $brandurl; ?&gt;&quot; &lt;?php if( $brand['brand_name'] == $currentbrand['brand_name']){ ?&gt;selected=&quot;selected&quot; &lt;?php } ?&gt;&gt;&lt;?php /* @escapeNotVerified */ echo __($brand['brand_name']); ?&gt;&lt;/option&gt; 
                  &lt;?php } ?&gt;
              &lt;/select&gt; 
  </code></pre>