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

useVirtualList gets no update on test cases #3949

Open
7 tasks done
eliamartani opened this issue May 2, 2024 · 1 comment
Open
7 tasks done

useVirtualList gets no update on test cases #3949

eliamartani opened this issue May 2, 2024 · 1 comment

Comments

@eliamartani
Copy link

Describe the bug

The issue is that the useVirtualList is not providing an updated list when running the application through unit tests. Making the application to behave as if there is no generated content (list) at all.

This issue is captured when the container is changed dynamically, in cases where the container is only visible in certain circumstances. The application starts the composable, the composable gets the reference of container but then the returned list is forever empty.

What happens is that the composable has useWatchForSizes and this function awaits for some change in container, that doesn't happen because it was changed dynamically and the only way to know is through size but size doesn't trigger the watch. Making list always empty.

Reproduction

don't have a link for that yet

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 84.56 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.14.1 - ~/.nvm/versions/node/v20.10.0/bin/pnpm
  Browsers:
    Brave Browser: 120.1.61.114
    Chrome: 124.0.6367.93
    Chrome Canary: 126.0.6452.0
    Edge: 124.0.2478.67
    Safari: 17.4.1

Used Package Manager

npm

Validations

@eliamartani
Copy link
Author

#3855 contains the fix for the problem I detected

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

No branches or pull requests

1 participant