39
Views
15
Comments
Solved
[OutSystems UI] DropdownSearch - disabledOptions doesn't show the StartingSelection
outsystems-ui
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hello all,

The disabledOptions configuration works correctly, but the pre-selected values (StartingSelection) do not seem to work, as all options are displayed unchecked.

Is there any workaround to make this work?

Thanks in advance

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @Paulo Torres 

AFAIK, that's not a supported use case.

If you can find a way to do that on a Codepen using the Virtual Select library, please let me know, but even from a UX perspective, having selected options that are disabled is a bit strange since conceptually they have an opposite meaning.

Cheers,
GM

2019-01-07 16-04-16
Siya
 
MVP

@Paulo Torres : This is what I have done.



Value for Dropdown Search :

StartingSelection :

disabledOptions

Result :

For me it seems works. Can you check if the Value in 'StartingSelection' matches in the values OptionLists.

2023-08-28 07-00-10
Paulo Torres
Champion

Hello,

What is the version of your OutsystemsUI?

Thanks

2019-01-07 16-04-16
Siya
 
MVP
2023-08-28 07-00-10
Paulo Torres
Champion

Your test case is different. If you set the disabled ID to the same value as StartingSelection, it doesn't work.

This appears to be a bug.

2019-01-07 16-04-16
Siya
 
MVP

As I understand it, when we say disabledOptions, those items should not be selected irrespective of StartingSelection. May be this is an intended functionality.

2023-08-28 07-00-10
Paulo Torres
Champion
2019-01-07 16-04-16
Siya
 
MVP

@Paulo Torres : "However, if at least one ID exists in both lists, the dropdown does not display any pre-selected values." - This statement is incorrect. In the shared OML, modify the GetStartingSelection Screen aggregate to include Id 5 ( or Sample_Color.Id = IntegerToIdentifier(5) ) and Set the Max Records to 3 and you can see Blue is preselected.

2025-12-03 17-22-41
Lavanya Kamalaguru

Hi @Paulo Torres ,

The starting selection only works if the values passed match exactly with the values in the options list. If the values are not aligned with the source list( for example due to different ID's, types, or the list being loaded later), the option will appear unchecked.

A common workaround is set to the selected values after the list is loaded. Once the options list is populated , loop through the list and mark the corresponding items as selected based on your  Starting Selection values. 

2023-08-28 07-00-10
Paulo Torres
Champion

Hello,

What is the version of your OutsystemsUI?

Thanks

2023-08-28 07-00-10
Paulo Torres
Champion

Your test case is different. If you set the disabled ID to the same value as StartingSelection, it doesn't work.

This appears to be a bug.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @Paulo Torres 

Could you please share a sample oml where we could check your exact use case?
That would help the community give more accurate help.

Cheers,
GM

2023-08-28 07-00-10
Paulo Torres
Champion

Sure @Gonçalo Martins. I was waiting for you :)

Summary: When the IDs in StartingSelection and DisabledOption are different, the component works correctly. However, if at least one ID exists in both lists, the dropdown does not display any pre-selected values.

Thanks

DropdownSearchTest.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @Paulo Torres, 

After testing it, I found that the issue is in your logic since you're setting the same records as disabled and starting values, which is not a valid use case:

If you have those values, it works:

Check your sample fixed.

Hope it helps!

Cheers,
GM

DropdownSearchTest_fixed.oml
2023-08-28 07-00-10
Paulo Torres
Champion

Hello @Gonçalo Martins ,

Actually, it’s not an issue. It was done on purpose. In some cases I may want to disable all options, even if they are selected, because when the dropdown is disabled and multiple options are selected, we can’t clearly see the selected values, it appears something like "5 options selected".

With the Dropdown component, is there any way to handle this scenario?

Thanks for your attention.

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @Paulo Torres 

AFAIK, that's not a supported use case.

If you can find a way to do that on a Codepen using the Virtual Select library, please let me know, but even from a UX perspective, having selected options that are disabled is a bit strange since conceptually they have an opposite meaning.

Cheers,
GM

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