One can generally loop through a collection of items to create several TabStrip instances as shown in the Tabs Collection article.
However, when I am dynamically adding or removing tabs I am hitting a variety of problems targeting:
Please add support for dynamic tabs.
Hello,
Please add a new TabStrip event for user navigation that can be cancelled via the event arguments (e.g. args.IsCancelled = true).
Currently, we can use ActiveTabIndexChanged and not update the ActiveTabIndex value. However, this only works if ShouldRender() returns true.
Currently, I am running to a scenario where I would like to keep the tab content for only some of the tabs instead of all tabs in the TelerikTabStrip. It would be really helpful is there is a PersistTabContent for individual tabs.
Scenario - one of my tabs has upload component where I am uploading files. The user selects the file and then decides to move to the other tab instead of completing the upload process. On activetabindexchanged event, I have confirmation button that checks to see if the user wants to move to the other tab or not. If they confirm, then the active tab changes, if they cancel then the active tab remains at the current tab, though it loses all selected file. To resolve this situation, I am using PersistTabContent = true on TabStrip, which then retains tab content for all tabs, rather than just upload component tab. Having PersistTabContent for individual tab in this case will resolve the issue.
Thank you.
Beena.
Hello
Many times when removing a TabItem manually, we need to update some parameter or trigger some event. I think this is a missing feature for the TabStrip Component and should be added as soon as possible. I made a Custom Version of the TabStrip and added this functionality (see the unrelined Lines below):
In TelerikTabStrip.razor.cs
/// <summary>
/// Fires when a tab has been removed.
/// </summary>
[Parameter]
public EventCallback<int> TabRemoved { get; set; }
void ITabContainer.RemoveTab(ICustomTab tab)
{
int tabIndex = Tabs.IndexOf(tab);
if (PersistTabContent)
{
PersistedTabs.Remove(tab);
}
Tabs.Remove(tab);
if (TabRemoved.HasDelegate)
TabRemoved.InvokeAsync(tabIndex);
}
This way we can handle the event of removing the TabItems manually and trigger additional actions.
What also could help is triggering the ActiveTabIndexChanged whenever a new TabItem is added or removed.
Thanks
BR
Besir
G'day
Just wondering if we can get an;
AllowDragReorder="true"
And added bonus; "OnDragReorder" event.
Similar to Telerik WPF;
Cheers
Phil
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.
Hello,
I am utilizing the TabStrip component with nested custom components that have parameters. When I change tabs, the inner child component's OnParametersSet is being fired off twice.
Please research if it's possible to prevent the duplicate renders and life cycle events.