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

[BUG] Incorrect spacing when placed inside Material UI transition component #542

Open
sterlingwalsh opened this issue Jan 25, 2022 · 3 comments
Labels
bug Something isn't working hacktoberfest This issue is suitable for the hacktoberfest ;) PR welcome You can give that a try :)

Comments

@sterlingwalsh
Copy link

Describe the bug
When Virtuoso is inside a "Grow" transition component provided by material ui, the items are truncated early leaving a large gap in the list

Reproduction
sandbox.

To Reproduce
Steps to reproduce the behavior:
In sandbox above,

  1. click toggle button to open the dropdown component
  2. start scrolling

Expected behavior
elements would fill available space

Screenshots
sandbox is sufficient

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome

Additional context
My actual project example also had margin issues resulting in the partial list of items that were displayed to be shifted up and never being able to scroll to the first item after scrolling down the list. That was not reproduced in the sandbox for some reason but alll issues are resolved just by removing the grow component.

@sterlingwalsh sterlingwalsh added the bug Something isn't working label Jan 25, 2022
@petyosi petyosi added the PR welcome You can give that a try :) label Jan 26, 2022
@petyosi
Copy link
Owner

petyosi commented Jan 26, 2022

From my experience, CSS transitions and resize observers don't get along very well, with ResizeObserver not reporting the final value. Feel free to investigate further and suggest a workaround.

@mortmoe
Copy link

mortmoe commented Feb 16, 2022

Have the same problem after upgrading from virtuoso 1.9.3 today. Possible workaround could be to delay the rendering of virtuoso until dialog (or grow) is done: https://codesandbox.io/s/virtuoso-material-transition-fixed-vm7zsu

Would it be possible to have a method triggering recalculation so we could do that onEntered (instead of using a state and delay like I've shown in the sandbox)?

@petyosi petyosi added the hacktoberfest This issue is suitable for the hacktoberfest ;) label Sep 7, 2023
@qcz
Copy link

qcz commented Mar 8, 2024

Same happens if you place a Virtuoso list inside a BlueprintJS Dialog component (uses transition when opening).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest This issue is suitable for the hacktoberfest ;) PR welcome You can give that a try :)
Projects
None yet
Development

No branches or pull requests

4 participants