-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Picker with infinite scroll / useAsyncList #1496
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
Comments
My fault... should have been "... onLoadMore={list.loadMore}> Now, the picker triggers loadMore when the selection is near the end. However, I get an exception: TypeError: Cannot read property 'key' of null
I tried adding to the useAsyncList: getKeys: item => item.name |
The VirtualizerItem for "loader" is created without a layoutInfo content: null |
It seems to work fine in storybook. I'm puzzled. |
@mfilteau I can't seem to reproduce your issue in my codesandbox, do you happen to have one that you can share? |
Hi Daniel, Looking at your codesandbox, I figured out the problem! Some check from <React.StrictMode> is throwing an exception. If you want to reproduce the issue, just change index.js:
Thanks! |
Gotcha, thanks for catching that. We have a umbrella strict mode issue here, I'll mention this issue there and close this. Feel free to reopen if any other issues occur. |
❔ Question
I've been trying to create a listbox-based component with async loading & infinite content using useAsyncList,
As it was not working as expected, I went to the basic and tried the code sample based on the (see below).
However, once the initial entries have been displayed, scrolling at the end of the picker's list doesn't load more items.
Is it supposed to work?
Thanks!
🔦 Context
💻 Code Sample
🌍 Your Environment
🧢 Your Company/Team
The text was updated successfully, but these errors were encountered: