Skip to content

PanelImperativeHandle.expand() do not expand to most recent size #561

@JohanPetersson

Description

@JohanPetersson

As per https://react-resizable-panels.vercel.app/imperative-api/panel, expand() should restore the most recent size, but it seems that the current size is not persisted when collapse() is called. Or am I missing something? I know we can use conditional panels, but I just want to collapse some panels with an animation and keep their state.

What is the intended usage of expand() if it doesn't handle this?

Should we keep track of the size of each panel ourselves before collapsing them, and instead of calling expand() we call resize()?

This page https://react-resizable-panels.vercel.app/props/panel also says isExpanded() is available in PanelImperativeHandle, but that is not true.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions