How does the search in a dropdown work?

The multidropdown field now has the ability to search for specific items within the list of options. I noticed it's quite fast at finding what I'm looking for even with a list of 1000+ items. I would like to know how the search it's being implemented to achieve this level of performance.

The reason why I'm asking is because I would like to try to implement it inside a custom picker if possible. The implementation I have is the same provided by Appian with a foreach loop and checking every item against the provided search. However this stalls with large amounts of data.

I know I can just replace the picker with the dropdown since it does the search for me and I have done that. But I would still like to know if there is a way to have that nice search inside the picker for future reference.

Thanks in advance.

  Discussion posts and replies are publicly visible