Unplanned
Last Updated: 07 May 2026 13:08 by Igor
Igor
Created on: 07 May 2026 13:08
Category: TabStrip
Type: Bug Report
1
PersistTabContent breaks lazy initialization when tabs transition from Visible=false to Visible=true

With `PersistTabContent="true"`, when tabs start with `Visible="false"` and later become `Visible="true"`, all visible tab contents are instantiated simultaneously instead of only the active tab.

Reproduction: 

@page "/TestPage"

<button @onclick="Load">Load</button>

<TelerikTabStrip PersistTabContent="true">
    <TabStripTab Title="Tab 1" Visible="@_tabsVisible">
        <TestInitComponent Message="Hello from tab1" />
    </TabStripTab>
    <TabStripTab Title="Tab 2" Visible="@_tabsVisible">
        <TestInitComponent Message="Hello from tab2" />
    </TabStripTab>
    <TabStripTab Title="Tab 3" Visible="@_tabsVisible">
        <TestInitComponent Message="Hello from tab3" />
    </TabStripTab>
</TelerikTabStrip>

@code {
    private bool _tabsVisible = false;

    private void Load()
    {
        _tabsVisible = true;
    }
}

TestInitComponent.razor

<h3>TestInitComponent</h3>

@code {

    [Parameter]
    public string Message { get; set; } = string.Empty;

    protected override void OnInitialized()
    {
        base.OnInitialized();
        Console.WriteLine($"TestInitComponent OnInitialized {Message}");
    }
}

Steps: Open page → click Load.

0 comments