The Calcite autocomplete component currently shows all autocomplete items whenever the component has focus and bolds text in each of the autocomplete items that matches the user's input (case-insensitive). When there are many options, sometimes the bolded items are not in view as the user types, giving the impression that there are no matches. The proposed change is to alter the behavior of the component to align with that of the ArcGIS JavaScript SDK's search widget, which only displays the items (suggestions) that have matched text, and even then, only a few (six by default, but it is customizable). I think the autocomplete behavior should either be changed to the proposed behavior, or there should be a Boolean property, like "filter-results", which would apply the proposed behavior if set to true.
Hi @jdyerLACSD. Thanks for the feedback.
The general use case is for the developer to handle the filtering of the autocomplete items as a user types and only slot in the results that should be presented to the user. However, we can consider the suggested feature for handling filtering automatically.
Thank you @MattDriscoll. Hopefully soon we can get an "Autocomplete with filter" sample in the Calcite documentation to assist developers with this use case. And even if my suggestion isn't implemented, it would still be useful to have a read-only "matched" Boolean property on autocomplete items or a read-only "matched-items" property on the autocomplete component that lists the items that match the user input. That would help the developer implement filtering without reimplementing the item-matching logic that the component is already performing to bold the matching item text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.