hi guys,
are we able to add a close button to tabs?
hi guys,
are we able to add a close button to tabs?
Hi Wei,
You will have to implement the closing of the tab yourself, but you can add components to the ‘tab’…
Tabs tabs = new Tabs();
final Tab tab = new Tab("Can Close");
Button close = new Button(VaadinIcon.CLOSE.create()), click -> tabs.remove(tab));
tab.addComponentAsFirst(close);
I think that should give you a close button that removes the tab.
Stuart.