Hello,

I am trying to use Dropdown search components in my reactive web app.

I am getting the list from REST api and list has more than 70K records. Displaying these many records in the dropdown is not a good idea. I want to  show dropdown results only if user provide minimum 3 characters in the search and filter based on that.

Thank you for your time. 

Hi Nannu.

That will depend on your implementation.

Usually, you place an IF on top of the client action to check input length and decide if you want to call the API.

Can you share your oml or a print of the OnChange Action?

Nuno Reis wrote:

Hi Nannu.

That will depend on your implementation.

Usually, you place an IF on top of the client action to check input length and decide if you want to call the API.

Can you share your oml or a print of the OnChange Action?

 

 

Hi Nuno,

I was trying to follow the same approach but I wasn't able to find the OnChange event in the "Dropdown Search" properties.

Thanks

I was thinking of a different component.

That one is based on JS so nothing you change on OS will affect it.

My only suggestion to speed it is to clone it (don't forget to bring the script Choices) and on Init Action javascript, reduce threshold to 0 (it is 0.2, look in line 32).

Explanation: it uses a fuzzy match that accepts small mistakes and tries to find similar words By setting it to zero, it will do an exact match.


(And before you try, editing minMatchCharLength doesn't work as you expect.)

Nuno Reis wrote:

I was thinking of a different component.

That one is based on JS so nothing you change on OS will affect it.

My only suggestion to speed it is to clone it (don't forget to bring the script Choices) and on Init Action javascript, reduce threshold to 0 (it is 0.2, look in line 32).

Explanation: it uses a fuzzy match that accepts small mistakes and tries to find similar words By setting it to zero, it will do an exact match.


(And before you try, editing minMatchCharLength doesn't work as you expect.)

 Hi Nuno, 

I cloned it and changed the value to 0 from 0.2. I am very new with JS, not sure which variable is holding value of user search text and where can I add OnChnage event. I only wanna display drop down when user provide at least 3 characters so that I can minimize number of records displaying in the dropdown list.

Thank you for your time.

I have the same problem. Want to use dropdown search for a record list of a few thousand.

Unfortunately there is no OnChange event for the widget, so I wonder how I can use the search input in my data fetch?