diff --git a/examples/Demo/Shared/Pages/Tabs/Examples/TabsDefault.razor b/examples/Demo/Shared/Pages/Tabs/Examples/TabsDefault.razor index 0dcd6d93cb..455c6597e2 100644 --- a/examples/Demo/Shared/Pages/Tabs/Examples/TabsDefault.razor +++ b/examples/Demo/Shared/Pages/Tabs/Examples/TabsDefault.razor @@ -51,7 +51,7 @@ If checked, the contents of Tab two and three will be loaded after 1 second of p @code { bool DeferredLoading = false; - string? activeid = "tab-1"; + string? activeid = "tab-3"; FluentTab? changedto; private void HandleOnTabChange(FluentTab tab) diff --git a/src/Core/Components/Tabs/FluentTabs.razor.cs b/src/Core/Components/Tabs/FluentTabs.razor.cs index 3dc2df38ff..752dfb42cf 100644 --- a/src/Core/Components/Tabs/FluentTabs.razor.cs +++ b/src/Core/Components/Tabs/FluentTabs.razor.cs @@ -156,6 +156,11 @@ protected override async Task OnAfterRenderAsync(bool firstRender) var horizontal = Orientation == Orientation.Horizontal; await _jsModuleOverflow.InvokeVoidAsync("fluentOverflowInitialize", _dotNetHelper, Id, horizontal, FLUENT_TAB_TAG, 25); + + if (ActiveTabId is not null) + { + await HandleOnTabChangedAsync(new TabChangeEventArgs() { ActiveId = ActiveTabId }); + } } }