-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
Description
Description
When all tabs are removed from a TabSheet, the component displays the loading animation .
Expected outcome
Loading animation should not be visible.
Minimal reproducible example
@Route("tabs-demo")
public class TabsDemoView extends VerticalLayout {
private static final long serialVersionUID = 1L;
private final TabSheet tabSheet = new TabSheet();
private int tabCounter = 1;
public TabsDemoView() {
Button addButton = new Button("Add Tab", e -> addTab());
Button removeButton = new Button("Remove Selected Tab", e -> removeSelectedTab());
add(addButton, removeButton, tabSheet);
}
private void addTab() {
String tabName = "Tab " + tabCounter;
VerticalLayout content = new VerticalLayout(new Text("This is content for " + tabName));
tabSheet.add(tabName, content);
tabCounter++;
}
private void removeSelectedTab() {
var selected = tabSheet.getSelectedTab();
if (selected != null) {
tabSheet.remove(selected);
}
}
}
Steps to reproduce
Use the sample code, remove the tabs by clicking the button.
Environment
Vaadin version(s): ?
Browsers
No response