xyz icon indicating copy to clipboard operation
xyz copied to clipboard

dropdown element input filter

Open dbauszus-glx opened this issue 10 months ago • 2 comments

It should be possible to provide a filter flag to the dropdown element.

In this case the dropdown element should be a text filter input which will actively update the dropdown ul/li elements shown.

mapp.ui.elements.dropdown({inputfilter: true})

With the input filter flag set the header > span should be an input element.

<button class="dropdown active" data-id="dropdown">
      <div class="head">
      <span data-id="header-span">Retail - Logos<!--isµ2-->
      </span>
      <div class="icon"></div>
      </div>
      <ul style="max-height: 1066px; width: 310px;"><li>Retail - Logos<!--isµ1--></li><li>Icons<!--isµ1--></li><li>Dots<!--isµ1--></li><!--isµ3--></ul></button>

On input the render of the ul list items will be filtered.

dbauszus-glx avatar Apr 25 '24 10:04 dbauszus-glx

For example the filter.dropdown may have a huge list of items. image

With the inputfilter it should be possible to reduce the list shown. image

Typing a letter into the inputFilter search input should immediately reduce the list to only show options beginning with the letter in the input search.

dbauszus-glx avatar May 08 '24 10:05 dbauszus-glx

in draft https://github.com/GEOLYTIX/xyz/pull/1250

cityremade avatar May 08 '24 18:05 cityremade

Additionally the dropdown wants a parameter to control the max length shown.

dbauszus-glx avatar May 13 '24 09:05 dbauszus-glx