-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Missing support for persistence of collapsed panels #234
Comments
I don't think it's a very high priority, but I do think this item could make sense to support.
This item doesn't make sense to me though. If you want an item's initial size to be collapsed, then having it expand to the minimum size seems reasonable and expected. (If you want it to expand to some other size, you can use the If you're talking about a previously rendered panel that was collapsed by the user, then it should be collapsed still after a reload, at which point I think we're really just talking about the first bullet point item above. I think what you're saying is that you want a panel to be both collapsed by default and expandable by toggle (or |
1.0.3 supports the first item you mentioned. The second one should be done in user-space I think. |
Thank you for implementing persistence for the expanded size, that's looking great.
I think the expectation is that if an item's initial size is collapsed, then it should expand to the default size (or the persisted expanded size, if present). I think of the minimum size only as the point where a panel collapses while dragging to make it smaller. |
Given that
react-resizable-panels
supports both collapsible panels and persistence, there are a couple of gaps in support for persistence of collapsible panels that would be useful:defaultSize
to 0 (so it's initially collapsed) then the panel will only expand to its minimum size. It's possible to work around this by callingcollapse()
on the panel immediately, but it would be useful if the library supported this, perhaps with an additional prop for the initial collapsed state.The text was updated successfully, but these errors were encountered: