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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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/