Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding virtual list during momentum scroll causes the virtual list to be blanked out when returning to it #225

Closed
aeharding opened this issue Oct 26, 2023 · 3 comments · Fixed by #226
Assignees

Comments

@aeharding
Copy link
Sponsor Contributor

Describe the bug
Hiding virtual list during momentum scroll causes the virtual list to be blanked out when returning to it.

To Reproduce

  1. Start momentum scrolling a view
  2. Tap a button to toggle to hide the view (setting display: none)
  3. Tap the button again to reveal the view
  4. Observe the virtual list is not rendered. Observe if you try to swipe the virtual list, the items reappear.

Expected behavior

Items should be rendered when virtual list becomes visible again.

Platform:

  • OS: iOS
  • Browser: Safari
  • Version of react: 18
  • Version of this package: 0.15.3

Additional context

Here is a video demonstrating this problem. I am tapping the bottom tab bar. When I tap to go to Inbox, the virtual list stays mounted with display: none set to a parent element. Tapping back to Posts removes display: none.

RPReplay_Final1698282751.MP4
@inokawa
Copy link
Owner

inokawa commented Oct 26, 2023

I have to do some investigation but visibility: hidden instead of display: none may solve the issue.

display: none will change sizes of all children to 0 but visibility: hidden is not. Size detection is key of this virtual list so that may cause strange behavior.

@inokawa
Copy link
Owner

inokawa commented Oct 26, 2023

I think it was fixed in 0.15.4!

@aeharding
Copy link
Sponsor Contributor Author

I think it was fixed in 0.15.4!

Can confirm! Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants