How to delete/close a TabSet?
See original GitHub issueI’m trying to programmatically delete a TabSet.
Actions.deleteTab
doesn’t do anything (possibly because it’s not a tab):
https://github.com/caplin/FlexLayout/blob/d8cac2915e8968a26bf3592ffe70c248c0d9d2dc/src/model/Model.ts#L257
model.doAction(Actions.deleteTab(tabSet.getId()));
Deleting each tab separately closes all the tabSet’s content, but the tabset itself is still there.
tabSet
.getChildren()
.map((node) => Actions.deleteTab(node.getId()))
.forEach((action) => model.doAction(action));
I tried updating the parent’s attributes too, eg.:
const parent = tabSet.getParent();
if (isNil(parent)) {
return;
}
// Logic not exactly the same, but illustrates my point
model.doAction(Actions.updateNodeAttributes(parent.getId(), { children: [] }));
But this doesn’t do anything either.
Can you advise on how to kill a tabset?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
How to Delete Recently Closed Tabs on Google Chrome
The easiest way to clear your Chrome recently closed tabs list is to close out of Chrome twice, as explained by Addictive Tips....
Read more >How to delete only "recently closed tabs" in Chrome?
1) check first what's on the list of "recently closed" tabs. · 2) open each and every one of those previously closed tabs...
Read more >How to Delete Recently Closed Tabs on Google Chrome
Click the wrench icon at the top of the page and click "History." Click "Edit Items" and check the box next to each...
Read more >Safari 101: How to Clear Your Recently Closed Tabs List
Next, tap "Clear," then select any of the four time ranges offered. No matter which option you choose, each will erase all your...
Read more >How to Close One or All Tabs in a Browser: Mobile & Desktop
1. Open a mobile browser. Tap the app icon of the browser that you want to open.
You can close tabs on Google Chrome...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There should be a view folder, I just tried removing node modules and calling yarn again in the CRA example and I’ve got the view folder
Added v0.5.16 with tabset attribute ‘enableClose’ for this, or you can use the action deleteTabset. See the New Features layout in the demo for an example https://rawgit.com/caplin/FlexLayout/demos/demos/v0.5/demo/index.html