We upgraded to the latest Telerik Blazor components (8.1.1).
I think there's a bug in the TabStrip when setting the index of the ActiveTabIndex or @bind-ActiveTabIndex.
The page will scroll to the active tab automatically.
Here's a link to the Repl - https://blazorrepl.telerik.com/GfaTEmbR45zQSzEq44
If you remove @bind-ActiveTabIndex="@ActiveTabIndex" from the TelerikTabStrip then the page load normally.
Thanks,
Cesar
The problem is caused by the tab index of the tab headers not being updated properly. The first one seems to have 0 at all times, while all others stay at -1. Instead, the active tab header should have tab index 0, while all others get -1.
This currently happening in both my application, and in some of your demos. If you set the focus to one of the tabs in the tabstrip, and then hit the tab key on the keyboard, it should set focus to the tabstrip content itself. However, in some cases it sets the focus right back to the tab, so you can never navigate off of the tab with the keyboard.
An example of this can be seen in the Overview and Scrollable Tabs demos, but it is working in position and alignment demo. I should also note that if I open the Overview and Scrollable demos in the Repl, it also works. So I'm not sure what is preventing it on the demo pages themselves. Any help would be appreciated, since the same thing is happening in my projects after I upgraded the Telerik controls to v9.x. Here are the demo links that I'm referring to.
https://demos.telerik.com/blazor-ui/tabstrip/overview
https://demos.telerik.com/blazor-ui/tabstrip/scrollable-tabs
We have recently update to version 7.0.0 of Telerik for Blazor controls.
We have also access to Progress ThemeBuilder application which we use to customize the default Material theme.
After the update to version 7 and also upgrading and compiling the new theme file for our application, TabStrip items fail to display the correct css and defaults to the theme's original css.
ThemeBuilder produces rules for the tab item items with the following path
.lvs-tabstrip.k-tabstrip .k-tabstrip-items-wrapper .k-tabstrip-items.k-reset.k-tabstrip-items-start .k-item.k-tabstrip-item
where the actual control generates the following
.lvs-tabstrip.k-tabstrip .k-tabstrip-items-wrapper .k-tabstrip-items.k-reset.k-tabstrip-items-start .k-item
As you can see it is missing the k-tabstrip-item class and the custom theme fails to render correctly. Either Telerik blazor libary did not add this extra class to each tab item or theme builder is inserting this class when it should not.
I can place this extra class on each TabStripTab element on its Class property, but I feel this is something that the actual Telerik for Blazor libray should do.
Looking at the source code of Telerik for Blazor library, the TabStipTab component generates add the k-item as default and then applies the value of property ClassToRender and its value is
$"{ActiveCssClass} {DisabledCssClass} {Class} {FirstItemClass} {LastItemClass}".Trim()
The Class is an empty string, which I currently use to "fix" the problem but I certainly would like a better solution like a real fix :)
Thank you telerik team
When the user selects an empty tab and then switches to another tab, the empty tab remains highlighted (appears as if it's still selected).
Reproduction: https://blazorrepl.telerik.com/mRkVczaV02S9QkmJ28
Steps:
1. Select the second tab (which has no content).
2. Select the first tab.
Both tabs are highlighted as selected.
To deactivate all tabs I have to set the ActiveTabIndex parameter to -1.
This was working up to version 4.6.0. After that version I start getting an error:
Here is an example with 4.6.0 where it is working:
https://blazorrepl.telerik.com/QSPuvKvI06m6AhF929
Here is an example with the current version:
https://blazorrepl.telerik.com/mIvOlqlI062NR9Vi59
Greetings.
I think I found a minor bug when using the TabStrip component. If you have something like this:
<TelerikTabStrip>
<TabStripTab Title="First tab">
<p>First content</p>
</TabStripTab>
<TabStripTab Title="Second tab">
<p>Second content</p>
</TabStripTab>
<TabStripTab Title="Third tab">
</TabStripTab>
</TelerikTabStrip>And you click the tab without content, it stays selected.
Regards
Here is a REPL test page. If the user navigates forwards and backwards via the Wizard buttons, the TreeView checkboxes persist their state. If the user navigates via the Stepper, the checkbox state is not retained.
The issue is triggered by the TabStrip.
A possible workaround is to prevent Stepper clicks with CSS:
.k-tabstrip .k-wizard .k-stepper .k-step {
pointer-events: none;
}
Accessibility issue for TelerikTabStrip (3.6.0)
Issue is found in the attached png file.
<TelerikTabStrip TabPosition="@TabPosition.Top">
<TabStripTab Title="Handoff">
<VideoHandoff></VideoHandoff>
</TabStripTab>
<TabStripTab Title="Handoff Status">
<VideoHandoffStatus></VideoHandoffStatus>
</TabStripTab>
</TelerikTabStrip>
I am using the Telerik TabStrip and am trying to make the tabs scrollable while also showing additional tabs once a button is pressed.
When the additional tabs are shown, the tabs are not scrollable. Notice that when you toggle the visibility of the tabs, the new tabs being shown do not make the tab list scrollable.
=====ADMIN EDIT=====
Here is a possible workaround for the time being - REPL link.
The TabStrip throws ArgumentOutOfRangeException if the first tab is not Visible.
<TelerikTabStrip>
<TabStripTab Title="A" Visible="false">
Tab A
</TabStripTab>
<TabStripTab Title="B" Visible="true">
Tab B
</TabStripTab>
<TabStripTab Title="C" Visible="true">
Tab C
</TabStripTab>
</TelerikTabStrip>
ActiveTabIndex works as expected when tabs are always Visible, but when you set the Visible property to false, then back to true, the ActiveTabIndex does not work.
<TelerikTabStrip @bind-ActiveTabIndex="@ActiveTabIndex" PersistTabContent="true">
<TabStripTab Title="Tab 0 Always Visible"><TabStripTab Title="@TabTitle" Visible="@IsTabVisible" >
..
IsTabVisible = true;
ActiveTabIndex = 1;
I encountered this behavior in both v2.30.0 and v3.2.0
<TelerikTabStrip TabPosition="TabPosition.Top">
<TabStripTab Title="Sofia">
</TabStripTab>
<TabStripTab Title="London">
</TabStripTab>
<TabStripTab Title="Paris">
<TelerikTabStrip TabPosition="TabPosition.Left">
@foreach (var item in new string[] { "one", "two", "three" })
{
<TabStripTab Title="@item">x</TabStripTab>
}
</TelerikTabStrip>
</TabStripTab>
</TelerikTabStrip>
Content inside the tabs is narrow and elements float next to each other. For example, charts or other divs have limited width (screenshot of the issue at the end of this post).
@using Telerik.Blazor@using Telerik.Blazor.Components.Chart@using Telerik.Blazor.Components.TabStrip@*WORKAROUND 1*@<style> .k-tabstrip .k-animation-container-relative { width: 100%; }</style>@*WORKAROUND 2<style> .k-tabstrip .k-animation-container-relative { display: block; }</style>*@<TelerikTabStrip> <TelerikTab Title="First"> First tab content. <div style="border: 1px solid red;">some div that must be as wide as the tab strip</div> Chart follows and it should also be as wide as the tab <TelerikChart> <TelerikChartSeriesItems> <TelerikChartSeries Type="ChartSeriesType.Line" Name="Product 1" Data="@series1Data"> </TelerikChartSeries> <TelerikChartSeries Type="ChartSeriesType.Line" Name="Product 2" Data="@series2Data"> </TelerikChartSeries> </TelerikChartSeriesItems> <TelerikChartCategoryAxes> <TelerikChartCategoryAxis Categories="@xAxisItems"></TelerikChartCategoryAxis> </TelerikChartCategoryAxes> <TelerikChartTitle Text="Quarterly revenue per product"></TelerikChartTitle> <TelerikChartLegend Position="ChartLegendPosition.Right"> </TelerikChartLegend> </TelerikChart> </TelerikTab> <TelerikTab Title="Second" Disabled="true"> Second tab content. This tab is disabled and you cannot select it. </TelerikTab> <TelerikTab Title="Third"> Third tab content. </TelerikTab></TelerikTabStrip><TelerikChart> <TelerikChartSeriesItems> <TelerikChartSeries Type="ChartSeriesType.Line" Name="Product 1" Data="@series1Data"> </TelerikChartSeries> <TelerikChartSeries Type="ChartSeriesType.Line" Name="Product 2" Data="@series2Data"> </TelerikChartSeries> </TelerikChartSeriesItems> <TelerikChartCategoryAxes> <TelerikChartCategoryAxis Categories="@xAxisItems"></TelerikChartCategoryAxis> </TelerikChartCategoryAxes> <TelerikChartTitle Text="Quarterly revenue per product"></TelerikChartTitle> <TelerikChartLegend Position="ChartLegendPosition.Right"> </TelerikChartLegend></TelerikChart>@code { public List<object> series1Data = new List<object>() { 10, 2, 5, 6 }; public List<object> series2Data = new List<object>() { 5, 8, 2, 7 }; public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };}