Search Issue Tracker
By Design
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
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/