Glitched Dropdown Logic in SDK7
DOCTOR dripp
Using a conditional drop down menu to reveal an additional drop down menu is causing issues within DCL.
We have a UI control panel. Default field is False. When you select True, an additional drop down menu appears below it.
Then, when that drop down menu is opened again in another instance, it defaults to True, but the additional drop down won't show. The only way around it is to change the drop down to another option (false) and back to true.
Lastraum K
I think the problem is when you set a
selectedIndex
, while the dropdown will show the correct info at that selected index, the index of the dropdown will always be zero. There seems to be a mismatch or a non-update when you pass in a specific selectedIndex
.This results in the toggling to a different choice to basically "enable" the dropdown and then toggle back to your actual selection.
```<Dropdown
options={loadRadius}
selectedIndex={loadRadiusIndex}
onChange={(index:number)=>{
loadRadiusIndex = index
updatePlayerLoadRadius(parseInt(loadRadius[index]))
}}
uiTransform={{
width: '100%',
height: '120%',
}}
color={Color4.White()}
fontSize={sizeFont(20, 15)}
/>```
DOCTOR dripp
3/3: Then switching back to the original object finally reveals the Select Action menu which should have been shown right when the menu was opened.
DOCTOR dripp
2/3: Switching to another object will show that object's actions in the Select Action menu
DOCTOR dripp
1/3: Here is an example of a drop down menu that is stuck. There should be an additional drop down menu below it, listing the object's actions.