Skip to content

Merge dimodi-patch-2-tabstrip-2999 into production #3002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions components/tabstrip/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,33 @@ This article explains the events available in the Telerik TabStrip for Blazor:

## ActiveTabIdChanged

The `ActiveTabIdChanged` event fires when the user changes the active tab. The event handler receives the new tab ID of type `string` as an argument. This event is designed to work with the new [`ActiveTabId` parameter](slug:tabstrip-tabs-collection).
The `ActiveTabIdChanged` event fires when the user changes the active tab. The event handler receives the new tab ID of type `string` as an argument. If the `Id` parameter of the `TabStripTab` is not set, the component will generate one automatically.

The `ActiveTabIdChanged` event is designed to work with the new [`ActiveTabId` parameter](slug:tabstrip-tabs-collection).

>caption Handle the tab ID selection changed event

````RAZOR
<TelerikTabStrip ActiveTabIdChanged="@HandleTabIdChange">
<TabStripTab Title="First">
<TabStripTab Title="First" Id="tab1">
First tab content. Click through the tabs.
</TabStripTab>
<TabStripTab Title="Second">
<TabStripTab Title="Second" Id="tab2">
Second tab content.
</TabStripTab>
<TabStripTab Title="Third">
<TabStripTab Title="Third" Id="tab3">
Third tab content.
</TabStripTab>
</TelerikTabStrip>

@Result

@code {
private string Result { get; set; }
private string Result { get; set; } = string.Empty;

private void HandleTabIdChange(string tabId)
{
Result = $"Current tab ID is {tabId}";
Result = $"The current tab ID is {tabId}";
}
}
````
Expand Down
12 changes: 6 additions & 6 deletions components/tabstrip/tabs-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To deactivate all tabs, set the ActiveTabId parameter to `string.Empty`.
@{
foreach (var tab in Tabs)
{
<TabStripTab @key="tab.Id" Title="@tab.Title" Visible="@tab.Visible" Disabled="@tab.Disabled">
<TabStripTab @key="@tab.Id" Id="@tab.Id" Title="@tab.Title" Visible="@tab.Visible" Disabled="@tab.Disabled">
<HeaderTemplate>
<span>@tab.Title</span>
</HeaderTemplate>
Expand All @@ -54,11 +54,11 @@ To deactivate all tabs, set the ActiveTabId parameter to `string.Empty`.
private string ActiveTabId { get; set; }

private List<Tab> Tabs { get; set; } = new List<Tab>
{
new Tab { Id = "home", Title = "🏠 Home", Visible = true, Disabled = false },
new Tab { Id = "profile", Title = "👤 Profile", Visible = true, Disabled = false },
new Tab { Id = "settings", Title = "⚙️ Settings", Visible = true, Disabled = false }
};
{
new Tab { Id = "home", Title = "🏠 Home", Visible = true, Disabled = false },
new Tab { Id = "profile", Title = "👤 Profile", Visible = true, Disabled = false },
new Tab { Id = "settings", Title = "⚙️ Settings", Visible = true, Disabled = false }
};

public class Tab
{
Expand Down