How to implement a collapsible panel collapsed by default ? #529
-
SummaryHey everyone 👋 I'm having trouble implementing some state and rendering logic around a panel which would be collapsed by default. I'd need a prop which would trigger rerender whenever panel collapsed state changes. In the same time, I would need to keep the previous size value of my panel, so that triggering an "expand" would expand it back to its default value. |
Beta Was this translation helpful? Give feedback.
Answered by
bvaughn
Feb 22, 2026
Replies: 1 comment 2 replies
-
|
What have you tried? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just adding some more info so Ic an make this as answered:
Use the
onResizecallback to update a variable in state or use thePanelref to checkisCollapsedThe library does this for you automatically when you call
expand()