FlexLayout
FlexLayout copied to clipboard
how can i show/hide tab
How do I do this when I switch different tabs in tabset, the tab inside the border can be hidden or displayed?
you can use the action Actions.selectTab(tabId) to select a tab in its tabset
you can use the action Actions.selectTab(tabId) to select a tab in its tabset I want to hide the tab inside the border, but I don't want to call addNode and deleteTab
Whether you can provide a visible property to control this behavior?
No, sorry, add/remove is the only way to do this
This property should be added as an improvement request,similar to the show field in the border
The ability to programmatically control border tab visibility would be SO helpful. Until I found this issue, I thought for sure the below code would work and was surprised when it didn't:
model.doAction(FlexLayout.Actions.updateNodeAttributes(border.getId(), { show: true }));
I guess I confused "show" for what something like an "expanded" attribute would do though.
Hmm, ok nevermind. Calling selectTab
will indeed cause the border tabset to expand. Sorry, I think I misunderstood the original intent of this issue.