Description
Bug seems to be related to the #565, #286 and #349.
When using Sortable.Grid with items that have dynamically changing heights (e.g., expanding/collapsing sections animated with react-native-reanimated), the layout breaks after the app is sent to the background for an extended period (5-10 minutes) and then brought back to the foreground. As a result, items visually overlap each other. The bug is fixed automatically after starting a drag.
It's also worth noting that the bug does not appear every time — it happens intermittently.
Steps to reproduce
- Run the provided example on an Android device.
- Tap "Item 2" to expand it, and click "+ Add" a few times to increase its height.
- Lock the device or send the app to the background.
- Wait for 5-10 minutes.
- Unlock the device and bring the app to the foreground.
- Observe the overlapping
SortableItem components. If the bug does not appear, repeat from step 2.
Code snippet, Snack or GitHub repository link
https://github.com/V0V45/sortables-layout-bug
React Native Sortables version
^1.9.4 with patch from: #579
Reanimated version
4.5.0
React Native Gesture Handler version
~2.32.0
React Native version
0.86.0
Platforms
Android
Architecture
Fabric (New Architecture)
Workflow
Expo Dev Client
Device
Real device
Acknowledgements
Yes
Description
Bug seems to be related to the #565, #286 and #349.
When using Sortable.Grid with items that have dynamically changing heights (e.g., expanding/collapsing sections animated with
react-native-reanimated), the layout breaks after the app is sent to the background for an extended period (5-10 minutes) and then brought back to the foreground. As a result, items visually overlap each other. The bug is fixed automatically after starting a drag.It's also worth noting that the bug does not appear every time — it happens intermittently.
Steps to reproduce
SortableItemcomponents. If the bug does not appear, repeat from step 2.Code snippet, Snack or GitHub repository link
https://github.com/V0V45/sortables-layout-bug
React Native Sortables version
^1.9.4 with patch from: #579
Reanimated version
4.5.0
React Native Gesture Handler version
~2.32.0
React Native version
0.86.0
Platforms
Android
Architecture
Fabric (New Architecture)
Workflow
Expo Dev Client
Device
Real device
Acknowledgements
Yes