Completed
Last Updated: 25 Jan 2020 09:42 by ADMIN
Release 2.4.0
Robert
Created on: 24 Oct 2019 16:15
Category: TabStrip
Type: Feature Request
2
Allow TabStrip with no active tabs

The ActiveTabIndex parameter can take a value -1 to denote that no tab should be selected. This can plug into the current two-way binding as well.

1 comment
ADMIN
Marin Bratanov
Posted on: 25 Jan 2020 09:42

Hello Robert,

This has been possible since November, I'm sorry this item did not get updated.

Here's the relevant docs: https://docs.telerik.com/blazor-ui/components/tabstrip/overview

Here's a sample:

 

<TelerikNumericTextBox @bind-Value="@ActiveTabIndex" Min="-1" Max="2" />

<TelerikTabStrip @bind-ActiveTabIndex="@ActiveTabIndex">
    <TabStripTab Title="First">
        First tab content.
    </TabStripTab>
    <TabStripTab Title="Second">
        Second tab content. I will be active initially due to the default value of the parameter.
        <br />
        <TelerikButton OnClick="@SelectThirdTab">Select Third Tab</TelerikButton>
    </TabStripTab>
    <TabStripTab Title="Third">
        Third tab content.
    </TabStripTab>
</TelerikTabStrip>

@code {
    public int ActiveTabIndex { get; set; } = -1;

    void SelectThirdTab()
    {
        ActiveTabIndex = 2;
    }
}

 

Regards,
Marin Bratanov
Progress Telerik

 UI for Blazor