Dropdown Search OutsystemsUI - Event to receive SearchKeyword
Application Type
Reactive

Hello all,

I need to clone the dropdown search from OutsystemsUI and Add an event to receive the SearchKeyword. Someone already needed to do this?

Thanks, Paulo Torres

mvp_badge
MVP

Hi Paulo,

You will have to define an event handler on the choices input for the mentioned use case.

Code Changes: DropdownSearch (Webblock) > Init (Client Action) > Init (JS Node)

Based on your use case, you can opt for any of the below-mentioned implementations.

1) Registering input change event handler

choices.input.element.addEventListener('change', 
    function () {
        $actions.OnSearchInputChange(this.value);
});

OR

2) Registering keyup event handler

choices.input.element.addEventListener('keyup', 
    function () {
        $actions.OnSearchInputChange(this.value);
});

Refer to the attached oml file.

I hope this helps you!


Kind regards,

Benjith Sam

RWA_Lab_DDSearch.oml

Hello Benjith Sam,

Thanks a lot, you are the BEST.

How I can avoid the search in client side? For example I'll add a boolean as input parameter (IsClientSearch), the goal of this event is to search in serverside.

Thanks a lot

Hello all,

Anyone can help on that?

Thanks

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