Closed ItsTonyDavid closed 1 month ago
I was doing some nested panels. But I needed to handle the father's panel size inside the nested Panel Group.
<PanelGroup direction="horizontal"> <Panel> {/* Stuff in here */} </Panel> <Panel id="father"> <PanelGroup direction="vertical"> <Panel id={child}> </Panel> <PanelResizeHandle/> <Panel id={child}> </Panel> </PanelGroup> </Panel> </PanelGroup>
Could the Panel with ID child handle the resize of the father panel too?
You can do this using the panel group onLayout prop or the panel onResize prop. (You can listen to size changes and pass them down as props or context to your nested components.)
onLayout
onResize
I was doing some nested panels. But I needed to handle the father's panel size inside the nested Panel Group.
Could the Panel with ID child handle the resize of the father panel too?