Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2021.3.19f1
2022.2.8f1
2023.1.0b5
2023.2.0a3
Issue ID
UUM-27655
Regression
No
Multiple foldouts expand and their elements get mixed up when scrolling a list of foldouts
How to reproduce:
1. Open the attached Project "UiToolkit" and load Scene "SampleScene"
2. Enter Play Mode
3. Expand the first element of the orange list
4. Scroll the orange list down
Expected result: Only the first element remains expanded and the elements of the foldout remain under the first foldout
Actual result: An additional foldout gets expanded and the elements of the first foldout are displayed alongside the elements of the newly expanded foldout
Reproducible with: 2021.3.19f1, 2022.2.8f1, 2023.1.0b5, 2023.2.0a3
Could not test with: 2020.3.45f1
Reproduced on:
- MacOS (Intel) Editor
Notes:
- The foldout that gets expanded is the one that enters the visible area in the ScrollView, as the first foldout is leaving the visible area
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
- PolySpatial “Trying to set shader on a Material Variant.” error is printed in the console when entering Play Mode
- Error “Shader error in 'YSCloudCover': call to 'tex3D' is ambiguous at Assets/YSCloudCoverText.shader(606) (on d3d11)“ is present when compiling tex3D shader with DXC
- Placeholder asset is not loaded with Advertisement Legacy sample when using the latest version of the package
- Addressables content build fails but the Player build is successful when building a development build
Resolution Note:
You would need to set the foldout's value in your UIFoldoutEntryController's `SetitemData`.
`m_Folder.SetValueWithoutNotify(itemData.isExpanded);`
This is assuming you would track the expanded state with a boolean variable named `isExpanded` in the MenuItem class.
You can have a look at the documentation here: https://docs.unity3d.com/Manual/UIE-create-list-view-complex.html
It would be similar to how they restore the value of the slider in the example. It also shows how you can register to the value changed event to keep the value up to date in your data.
Please use the forum if you need more information. https://forum.unity.com/forums/ui-toolkit.178/
Resolution Note (2023.2.X):
You would need to set the foldout's value in your UIFoldoutEntryController's `SetitemData`.
`m_Folder.SetValueWithoutNotify(itemData.isExpanded);`
This is assuming you would track the expanded state with a boolean variable named `isExpanded` in the MenuItem class.
You can have a look at the documentation here: https://docs.unity3d.com/Manual/UIE-create-list-view-complex.html
It would be similar to how they restore the value of the slider in the example. It also shows how you can register to the value changed event to keep the value up to date in your data.
Please use the forum if you need more information. https://forum.unity.com/forums/ui-toolkit.178/