FlexLayout
FlexLayout copied to clipboard
Cannot add tab to an empty tabset using Actions.addnode or addTabToTabset
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
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)