-
-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I wanna resize each panel in V4, so I try to use the hook: useGroupRef. But it throw an error: Could not find Group with id ":r29:"
Here's my usage:
import {
Group,
Panel,
Separator,
useGroupRef
} from 'react-resizable-panels';
const groupRef = useGroupRef();
useEffect(() => {
if (!isSplit) {
groupRef?.current?.setLayout({
mainContent: 100,
splitContent: 0,
});
}
}, [isSplit]); // this 'isSplit' param is from props
<Group
orientation="horizontal"
groupRef={groupRef}
>
<Panel id="mainContent">main</Panel>
<Separator />
<Panel id="splitContent">split</Panel>
</Group>If there is any mistake in my usage or any problem, please let me know. Thank u ~
version: 4.0.16
react version: 18.3.1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working