-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
AutoSizer does not show list items with scrollToIndex #691
Comments
Not sure what the demo is showing but it's not using Closing this for now since it seems to work okay for me. We can keep talking here though if I'm overlooking something. 😄 |
Are you saying that the AutoSizer can only pan out vertically instead of horizontally? Did you see how the demo doesn't show the menu items before the scrollToIndex? Or you can check this one (https://plnkr.co/edit/uYtFXdNNw1a5CRwKgaO8?p=preview). When I pick a large scrollToIndex number... the entire list is missing. |
No. I was juust saying that the original Plnkr is strange. This is not how <AutoSizer>
{({height, width}) => ( // height and width are not used, so why use AutoSizer?
<List
width={this.state.open ? 500 : 0}
height={700} I think the problem you're reporting is that the combination of setting If you change... width={this.state.open ? 500 : 0} ...to... width={this.state.open ? 500 : 1} ...your example works. I'll re-open. Feel free to submit a PR if you'd like. 😄 |
Yes. I tried to do 1 instead of 0 and used a CSS visibility to hide the list. It works but it seems to be a hack. |
Yeah. I was just thrown by the original Plnkr b'c it seemed like it was doing things that weren't valid. |
I will see if there's a fix for this over the weekend :) |
Resolved via 67f9dc5 |
Fix released with 9.8.0 |
Demo here: https://plnkr.co/edit/6GFoRcQrM3jdy3aYGvly?p=preview
I have a list that pans out when a user clicks the open button. However, when I use it with scrollToIndex to scroll to a specific list item, it seems to hide the items that are above the index. And if you change the index to a larger number, the entire list disappears. This problem goes away when you scroll onto the list, but it returns you to the top instead of the indexed item.
The text was updated successfully, but these errors were encountered: