DropdownSearch OnSearch Event
34
Views
3
Comments
New
OutSystems UI

Would it be possible to add an event for when the search input of the DropdownSearch widget is changed? Alternatively, an event for when the search yields no matches would be useful.

The use case I have in mind is a user searches for an item in the DropdownSearch. If no items are found, an option for the user to specify a custom item is given. For example, the DropdownSearch has a list of books. The user searches for a book that is not in the list. The user has the option of specifying the book that the user has in mind.

Hi Wayne,

DropdownSearch has an option to allow adding new items to the list. You can configure this by adding the client action SetVirtualSelectConfigs and set the option allowNew to Entities.BooleanTypes.True.

Now when searching for an item there is "plus" indicator in the search field. When you hit enter this adds the value to the list and raises the OnChange event. You could use this option as a workaround to handle the onchange event and immediately setting the dropdown search list to its inital values, as you may not to really add a new list item :-)

Stefan 


Hi Wayne,

Does the solution provided by Stefan, cover what you described as Idea?

Regards,

Daniel

@Stefan Weber , thanks for your suggestion which definitely addresses the use case I have in mind.