Dropdown search questions
Application Type
Reactive

Hi,

I have a couple of questions regarding the Dropdown search widget:

  1. Is there any control over the user input? Can I trigger actions? I want to avoid loading a big list from an API call, but refining it on key-up, but my feeling is that the intended use of the widget, it's a search, not an autocomplete. If this is the case, then what is the way to get an autocomplete (dynamically refreshed as the user input changes) from an API call?
  2. If I set the ImageUrlOrIcon value, when I select the value, I only see the label, while I would like to see both image/icon AND label. Is there a way to do it?

Thank you,

Andrea

Hi Andrea,

  1. That's right, the Dropdown Search pattern is designed to search in a pre-loaded list of records, and not to work as an autocomplete. If you need an autocomplete, this one from the Forge is really good.
  2. Not out of the box. The ImageUrlOrIcon attribute only affects what you see in the list, and not what you see after selecting an element. You could try to clone the pattern and customize it to add this feature.

Thank you Aurelio. All clear and as I expected, I just wanted to be sure I wasn't missing anything obvious. I will give the autocomplete you mentioned a try.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.