question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] children components of VirtuosoGrid get unmounted when navigate on Ionic5

See original GitHub issue

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 to customScrollParent 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 and VirtuosoGrid with/without custom scroll element.

Steps to reproduce the behavior:

  1. Go to ListPage.tsx
  2. Check each case. Each case is comment out.
  3. Scroll down several times and route to DetailPage by clicking a link. Then, go back to ListPage by clicking header back button.

Expected behavior Items should not be unmounted after coming back to list page. Virtuoso and VirtuosoGrid without custom scroll element works as expected. Only when custom scroll element is passed to VirtuosoGrid customScrollParent props, Items are unmounted and scroll position is set to top.

Desktop (please complete the following information):

  • OS: macOs 12.3(m1)
  • Browser chrome 101.0.4951.64 (arm64), safari(15.4)

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
petyosicommented, May 27, 2022

Got it. There’s a guard condition for that in the list but not in the grid, should be an easy fix.

0reactions
github-actions[bot]commented, Jun 19, 2022

🎉 This issue has been resolved in version 2.13.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
Musica gospel impossivel te esquecer, Irvington fireworks, Ljuba alicic u sapcu kraj save lyrics, Kawalerskie kabaret, Children's day quotes from bible!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found