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] VirtuosoMockContext not working in conjunction with initialTopMostItemIndex #1001

Open
mstykow opened this issue Oct 27, 2023 · 1 comment
Labels
bug Something isn't working PR welcome You can give that a try :)

Comments

@mstykow
Copy link

mstykow commented Oct 27, 2023

Describe the bug
Using VirtuosoMockContext to test components using Virtuoso fails as soon as initialTopMostItemIndex is set to something other than undefined or 0.

Reproduction

  1. Open this Sandbox: https://codesandbox.io/p/sandbox/heuristic-morning-87qd4l
  2. Run yarn test in a terminal.
  3. Note that tests are failing.
  4. Comment out the line involving initialTopMostItemIndex.
  5. Notice tests are passing.

Expected behavior
VirtuosoMockContext works even when initialTopMostItemIndex is set.

Additional context
react 18.2.0
react-virtuoso 4.6.2

@mstykow mstykow added the bug Something isn't working label Oct 27, 2023
@petyosi
Copy link
Owner

petyosi commented Oct 29, 2023

Happy to accept a PR on the matter.

@petyosi petyosi added the PR welcome You can give that a try :) label Oct 29, 2023
mstykow added a commit to opossum-tool/OpossumUI that referenced this issue Jan 11, 2024
- do not animate list on initial render
- use work-around because of react-virtuoso issue petyosi/react-virtuoso#1001

closes #2489

Signed-off-by: Maxim Stykow <[email protected]>
mstykow added a commit to opossum-tool/OpossumUI that referenced this issue Jan 11, 2024
- do not animate list on initial render
- use work-around because of react-virtuoso issue petyosi/react-virtuoso#1001

closes #2489

Signed-off-by: Maxim Stykow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR welcome You can give that a try :)
Projects
None yet
Development

No branches or pull requests

2 participants