RadzenTabs TabPosition.Left - 'tab panel' has incorrect width if RadzenDataGrid is inside a tab. #1434

Closed
opened 2026-01-29 17:53:36 +00:00 by claunia · 0 comments
Owner

Originally created by @OndrejUzovic on GitHub (Oct 16, 2024).

In case RadzenTabs is set to TabPosition.Left and some tab contains RadzenDataGrid then if that tab gets the focus, the width of the 'tab panel' decreases - in some cases the width decreases to zero and tabs are not usable anymore.

RadzenTabs

Steps to reproduce:

  1. Apply the source code bellow.
  2. Click between tabs - if a grid tab gets the focus, the width of the 'tab panel' decreases.

Source code to reproduce:

<RadzenTabs TabPosition="TabPosition.Left">
    <Tabs>
        <RadzenTabsItem Text="Tab 1" />

        <RadzenTabsItem Text="Tab 2 - grid">
            <RadzenDataGrid TItem="Thing" Data="@myThings">
                <Columns>
                    <RadzenDataGridColumn TItem="Thing" Title="Name" Property="Name" Width="100%" />
                </Columns>
            </RadzenDataGrid>
        </RadzenTabsItem>

        <RadzenTabsItem Text="Tab 3" />
    </Tabs>
</RadzenTabs>

@code {
    private class Thing
    {
        public string Name { get; set; }
    }

    private List<Thing> myThings = new List<Thing>() { new Thing() { Name = "Something" } };
}

The behavior was introduced in the 5.2.5 version and is caused by suppressing the 'flex:1' parameter in rz-tabview-panels:

image

Originally created by @OndrejUzovic on GitHub (Oct 16, 2024). In case `RadzenTabs` is set to `TabPosition.Left` and some tab contains `RadzenDataGrid` then if that tab gets the focus, the width of the 'tab panel' decreases - **in some cases the width decreases to zero and tabs are not usable anymore**. ![RadzenTabs](https://github.com/user-attachments/assets/a51489fd-862c-429c-91c4-d73f4b3b7e29) **Steps to reproduce:** 1. Apply the source code bellow. 2. Click between tabs - if a grid tab gets the focus, the width of the 'tab panel' decreases. **Source code to reproduce:** ``` c# <RadzenTabs TabPosition="TabPosition.Left"> <Tabs> <RadzenTabsItem Text="Tab 1" /> <RadzenTabsItem Text="Tab 2 - grid"> <RadzenDataGrid TItem="Thing" Data="@myThings"> <Columns> <RadzenDataGridColumn TItem="Thing" Title="Name" Property="Name" Width="100%" /> </Columns> </RadzenDataGrid> </RadzenTabsItem> <RadzenTabsItem Text="Tab 3" /> </Tabs> </RadzenTabs> @code { private class Thing { public string Name { get; set; } } private List<Thing> myThings = new List<Thing>() { new Thing() { Name = "Something" } }; } ``` **The behavior was introduced in the 5.2.5 version and is caused by suppressing the 'flex:1' parameter in `rz-tabview-panels`:** ![image](https://github.com/user-attachments/assets/98821ba5-c285-4a8d-8154-a57f1484e8ad)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1434