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

Expandable item #92

Closed
smuk3c opened this issue Nov 20, 2018 · 11 comments
Closed

Expandable item #92

smuk3c opened this issue Nov 20, 2018 · 11 comments

Comments

@smuk3c
Copy link

smuk3c commented Nov 20, 2018

I am working on smaller list where we need an option to expand item (and change height of it). It seems like current api doesn't support that. resetAfterIndex is causing re-rendering, but not refreshing the height of the actual item. Does react-window currently support this option?

@bvaughn
Copy link
Owner

bvaughn commented Nov 20, 2018

resetAfterIndex should work for what you're describing. In fact, there are unit tests for this.

Can you please point me at a repro that shows what's not working for you? Here's a Code Sandbox you can fork to get started.

@IOuser
Copy link

IOuser commented Nov 22, 2018

I've added expandable items to Brian's example and it works: https://codesandbox.io/s/kmzrylpx7o
Hope it helps.

@bvaughn
Copy link
Owner

bvaughn commented Nov 22, 2018

I'm going to close this for now. Will re-open if repro steps are provided. 😄

@fonty422
Copy link

I know this is closed for now, but what about an animated expanding div. Not just something with 2 hard coded values. I have a need to use the material-ui ExpansionPanel, but implementing this leaves me with a panel that expands but doesn't displace the rest of the list.

@PQALAB
Copy link

PQALAB commented Dec 6, 2019

Thanks for this, it helped me a bunch

@itayganor
Copy link

@fonty422 Have you ever found a solution for animated expanding divs?

@fonty422
Copy link

@itayganor I ended up using a different package (react-virtuoso) and going through the less painful (but still painful) method of providing a pre-culled list of items. Also, the material-ui page discussed it as a recommendation (along with react-window) for large lists. The demo page will show you if it's any good for your purposes.

@itayganor
Copy link

@fonty422 This is amazing. So simple. Thank you!

I actually have a question but I don't want to spam this discussion, so I'm creating it over there.

@theconnectionist
Copy link

@itayganor I ended up using a different package (react-virtuoso) and going through the less painful (but still painful) method of providing a pre-culled list of items. Also, the material-ui page discussed it as a recommendation (along with react-window) for large lists. The demo page will show you if it's any good for your purposes.

@fonty422 @itayganor do you have sample code of how you implemented nested lists using react-virtuoso? I'm not able to find examples of how it is done.

@robertfmath
Copy link

robertfmath commented Apr 5, 2024

@itayganor I ended up using a different package (react-virtuoso) and going through the less painful (but still painful) method of providing a pre-culled list of items. Also, the material-ui page discussed it as a recommendation (along with react-window) for large lists. The demo page will show you if it's any good for your purposes.

@fonty422 Thank you for bringing my attention to this package. It worked perfectly for my team's use case. Simple and easy to implement.

@fonty422
Copy link

fonty422 commented Apr 8, 2024

@itayganor I ended up using a different package (react-virtuoso) and going through the less painful (but still painful) method of providing a pre-culled list of items. Also, the material-ui page discussed it as a recommendation (along with react-window) for large lists. The demo page will show you if it's any good for your purposes.

@fonty422 Thank you for bringing my attention to this package. It worked perfectly for my team's use case. Simple and easy to implement.

You're welcome. It's still my preferred package for this work for exactly this reason.

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

8 participants