FlexLayout icon indicating copy to clipboard operation
FlexLayout copied to clipboard

Cannot add tab to an empty tabset using Actions.addnode or addTabToTabset

Open sharmillamuthu opened this issue 2 years ago • 1 comments

I have the following layout model: var json: IJsonModel = { global: {}, borders: [], layout: { type: "row", weight: 100, children: [ { type: "tabset", weight: 50, id: "test", children: [] } ] } };

And I'm trying to add a tab to this tabset using Actions.addNode or addTabToTabset, but its not adding to the tabset. Is this the expected behaviour? Reproduced here: https://codesandbox.io/s/tender-silence-r5p5v

sharmillamuthu avatar Jan 13 '22 15:01 sharmillamuthu

adding: enableDeleteWhenEmpty: false, to the tabset will solve the problem. Without that the tabset is removed when the layout is loaded (since it's empty)

nealus avatar Jan 13 '22 16:01 nealus