Closed 21hak closed 2 years ago
Sry, I forgot to save😂 . Here's the link. https://codesandbox.io/s/compassionate-williamson-20b6gl?file=/src/pages/ListPage/ListPage.tsx I'll reproduce without ionic. Thank you
Hi! I made a quick reproduction. I think this happens when the display
property of container element changed to none
.
https://codesandbox.io/s/small-cherry-zzobtx?file=/src/App.tsx
Got it. There's a guard condition for that in the list but not in the grid, should be an easy fix.
:tada: This issue has been resolved in version 2.13.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Describe the bug Children elements of
VirtuosoGrid
get unmounted when navigate to other page using Ionic router. This only happens when custom scroll element is passed tocustomScrollParent
props. As children components are unmounted, scroll moves to top which causes problems.Reproduction https://codesandbox.io/s/pedantic-dirac-5lhh7k?file=/src/pages/ListPage/ListPage.tsx
To Reproduce There are 4 cases.
Virtuoso
with/without custom scroll element andVirtuosoGrid
with/without custom scroll element.Steps to reproduce the behavior:
ListPage.tsx
Expected behavior Items should not be unmounted after coming back to list page.
Virtuoso
andVirtuosoGrid
without custom scroll element works as expected. Only when custom scroll element is passed toVirtuosoGrid
customScrollParent
props, Items are unmounted and scroll position is set to top.Desktop (please complete the following information):
Additional context Add any other context about the problem here.