Open adityatoshniwal opened 1 year ago
Give your main panel an id (e.g. "main") and then use dockMove(newTabData, "main", "middle") to add a tab to your main panel. (newTabData should hold the TabData of the content that you want to show., e.g. let newTabData = {content: <div>This is a new tab</div>, title: "New Tab", closable: true}
)
@rayman-de That's the tab content. I am talking about the panel content when all the tabs are closed.
A panel is a container for tabs, it is not meant to hold content by itself. As a workaround, you could pass a handler to the DockLayout's onLayoutChange prop that switches the layout with a placeholder once the panel has no tabs.
@rayman-de I understand. But a panel can be blank - if it can be blank then it should allow some content. Taking an example of VS-Code which shows some content when no tabs are open.
Hi,
I have created a main panel(locked) with all tabs closable. I want to show something on the blank main panel when all the panels are closed. How can I do that?
Thanks.