summaryrefslogtreecommitdiff
path: root/Pages
diff options
context:
space:
mode:
Diffstat (limited to 'Pages')
-rw-r--r--Pages/Component/TabContainer.razor4
1 files changed, 3 insertions, 1 deletions
diff --git a/Pages/Component/TabContainer.razor b/Pages/Component/TabContainer.razor
index ed61f49..3caab0b 100644
--- a/Pages/Component/TabContainer.razor
+++ b/Pages/Component/TabContainer.razor
@@ -16,7 +16,7 @@
[Parameter]
public RenderFragment ChildContent { get; set; }
- public TabPane ActivePane { get; set; }
+ public TabPane? ActivePane { get; set; }
List<TabPane> Panes = new();
public void AddPane(TabPane tabPane) {
@@ -27,6 +27,8 @@
}
public void RemovePane(TabPane tabPane) {
+ if(ActivePane == tabPane)
+ ActivePane = Panes.ElementAtOrDefault(0);
Panes.Remove(tabPane);
StateHasChanged();
}