Skip to content

Commit

Permalink
Fix #1194 #v3 (#1222)
Browse files Browse the repository at this point in the history
* Fix #1194 #v3

* Add _shouldRender =true to if to be on the safe side
  • Loading branch information
vnbaaij committed Dec 28, 2023
1 parent ea03043 commit 38d0aff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Core/Components/Tabs/FluentTabs.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public partial class FluentTabs : FluentComponentBase
private DotNetObjectReference<FluentTabs>? _dotNetHelper = null;
private IJSObjectReference _jsModuleOverflow = default!;

private bool _shouldRender = true;

/// <summary />
protected string? ClassValue => new CssBuilder(Class)
.Build();
Expand Down Expand Up @@ -153,6 +155,11 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
}
}

protected override bool ShouldRender()
{
return _shouldRender;
}

private async Task HandleOnTabChanged(TabChangeEventArgs args)
{
if (args is not null)
Expand All @@ -164,6 +171,11 @@ private async Task HandleOnTabChanged(TabChangeEventArgs args)
ActiveTabId = tabId;
await ActiveTabIdChanged.InvokeAsync(tabId);
}
_shouldRender = true;
}
else
{
_shouldRender = false;
}
}

Expand Down

0 comments on commit 38d0aff

Please sign in to comment.