Hi guys,

I have been working frequently with the dropdown search in reactive apps. Faced some issues especially when loading big chunks of data, and applied some conditions to allow data to be load before presenting.

Although, now that I am using two lists with no more than 50 rows, each of the dropdown select widgets are not initializing with the empty state. 

I believe this is being triggered by the selectedItem widget variable, but no idea why. 

Any guess?

Hi,

What I've identified so far is that you have to put something to "Empty Text" attribute of a Dropdown and set corresponding variable to Null for the Dropdown to be empty.

Hope this helps.

Vitaly Martynenko wrote:

Hi,

What I've identified so far is that you have to put something to "Empty Text" attribute of a Dropdown and set corresponding variable to Null for the Dropdown to be empty.

Hope this helps.


Hi Vitaly,

the empty text attribute is set to "Search".

I could see that the behavior of the dropdown search instances are showing the "Search" text while the data from the aggregates are being fetched. After that, there is something instructing the dropdown to show the 1st result in the list.


Not sure what is causing this. 

Can you share your oml file?

Going to run some tests on my own as well.

Ok, my tests don't show a similar behavior. All combos are filled with empty text value.

Does that "Search" still present on the dropdown list?

Vitaly Martynenko wrote:

Ok, my tests don't show a similar behavior. All combos are filled with empty text value.

Does that "Search" still present on the dropdown list?

Hi Vitaly

Yes, still present in the dropdown list. I found out that when the dropdown search is not inside a form has this behavior.


cpinho wrote:

Vitaly Martynenko wrote:

Ok, my tests don't show a similar behavior. All combos are filled with empty text value.

Does that "Search" still present on the dropdown list?

Hi Vitaly

Yes, still present in the dropdown list. I found out that when the dropdown search is not inside a form has this behavior.


Actually this is not correct. I don't know what is provoking this behavior of the dropdown search.

This is what it shows when it loads:

And as you can see, the "-Select-" EmptyText var is in the list.

So why is it not showing it when data is fetched?


Would it be possible for you to share your .oml file?

You might have an OnChange event handler which applies some changes to a DropDown variable

Also just noticed you're referring to a DropDown Search and I was looking at DropDown. Let me run some tests with it

Vitaly Martynenko wrote:

Would it be possible for you to share your .oml file?

You might have an OnChange event handler which applies some changes to a DropDown variable

Hi Vitaly, difficult share the oml as it has several custom dependencies and over 100mb



After running a quick test I can confirm it works fine for me.

Maybe your SelectedItem variable is initialized with some value or OutsystemsUI dependency is outdated.

Vitaly Martynenko wrote:

Also just noticed you're referring to a DropDown Search and I was looking at DropDown. Let me run some tests with it

Sorry that it was not clear. Thanks for the help.


Vitaly Martynenko wrote:

After running a quick test I can confirm it works fine for me.

Maybe your SelectedItem variable is initialized with some value or OutsystemsUI dependency is outdated.

That's the thing, in some screens it works fine, some other not despite they are all set in the same way.


cpinho wrote:

That's the thing, in some screens it works fine, some other not despite they are all set in the same way.

What I would suggest - check your variable and your database values which become Value attribute for an ItemList.

Do you use integer identifiers or text ones?

I've had some issues with text identifiers before with dropdowns, maybe that problem still exists for DropDownSearch


I was able to reproduce this issue (kind of).

SelectedItem variable is empty, Static Entity is used as ItemList and Id is text.

"None" record has an empty Id string and it gets auto-selected after data is loaded.

Try to isolate your issue. Create a new module just for the test purposes, copy your DropDown Search input, variable, source entity and run a test just on that module.

I've attached my test module in case you'd like to see it.