xyz
xyz copied to clipboard
dropdown element input filter
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.
For example the filter.dropdown may have a huge list of items.
With the inputfilter it should be possible to reduce the list shown.
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.
in draft https://github.com/GEOLYTIX/xyz/pull/1250
Additionally the dropdown wants a parameter to control the max length shown.