Tabstrip Scrollable not work when tab count is dynamic

1 Answer 65 Views
TabStrip
Brandon
Top achievements
Rank 1
Iron
Brandon asked on 21 Nov 2022, 01:47 PM | edited on 21 Nov 2022, 01:48 PM

Hi there,

I use the sample code in here and I can see the scrollable icon.

But when I try to add tabs by button click , the scrollable  icon is not shown.

How to fix it?


<TelerikTabStrip Scrollable="true"
                 Width="300px"
                 TabPosition="Telerik.Blazor.TabPosition.Top">
    @{
        for (int i = 0; i < tabCount; i++)
        {
            var title = "long long long-" + @i.ToString();
            
            <TabStripTab Title="@title" @key="@i">
                Tab content.
            </TabStripTab>
        }
    }
</TelerikTabStrip>

<TelerikButton OnClick="AddTab">add tab</TelerikButton>

@code {
    int tabCount = 0;

    void AddTab()
    {
        tabCount++;
        StateHasChanged();
    }
}

Brandon
Top achievements
Rank 1
Iron
commented on 23 Nov 2022, 08:40 AM

I just found it fixed in version  3.7 

1 Answer, 1 is accepted

Sort by
0
Brandon
Top achievements
Rank 1
Iron
answered on 23 Nov 2022, 08:41 AM
I just found it fixed in version  3.7 
Tags
TabStrip
Asked by
Brandon
Top achievements
Rank 1
Iron
Answers by
Brandon
Top achievements
Rank 1
Iron
Share this question
or