PanelLock with controlled layout
rickiezz opened this issue · comments
Hello,
Ive been trying to get a panel to stay when all the tabs are closed in controlled layout, but so far ive had no luck with it. Ive defined minHeight, minWidth, flexHeight, flexWidth, but none of them seem to really do anything.
I hope you can let me know what I am not seeing to make it work.
Thanks in advance!
Hello, got the same question and resolved it using the afterPanelLoaded
props of DockLayout, customize the PanelData in this method.
Example :
const afterPanelLoaded = (savedPanel, loadedPanel) => {
if (savedPanel.id === 'your-panel-id')
loadedPanel.panelLock = {}
};
Yes, that worked!
Thanks for the help.