Initially collapsed SplitterPane has size 0 on first expand #1237

Closed
opened 2026-01-29 17:50:51 +00:00 by claunia · 1 comment
Owner

Originally created by @osre77 on GitHub (May 19, 2024).

Describe the bug
When I create a horizontal Splitter with 2 SplitterPanes, and set the right one to Collapsible="true" Collapsed="true" Size="300px", it will expand with size 0.
When I drag it to have a size, collapse end then expand it, the size it had on collapse is restored.

To Reproduce
Steps to reproduce the behavior:

  1. Have a page with
<RadzenSplitter Orientation="Orientation.Horizontal">
    <RadzenSplitterPane Collapsible="false">
        Left pane
    </RadzenSplitterPane>

    <RadzenSplitterPane Collapsible="true" Collapsed="true" Size="300px">
        Right pane
    </RadzenSplitterPane>
</RadzenSplitter>
  1. Expand the right pane
    Pane expands with size 0 -> Error, should restore with 300px
  2. Drag splitter to give right pane some size
  3. Collapse right pane
  4. Expand right pane
    Right pane restores size as expected

Expected behavior
When the right pane is expanded the 1st time, it should have the configured Size of 300px.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: 4.31.5
Originally created by @osre77 on GitHub (May 19, 2024). **Describe the bug** When I create a horizontal Splitter with 2 SplitterPanes, and set the right one to Collapsible="true" Collapsed="true" Size="300px", it will expand with size 0. When I drag it to have a size, collapse end then expand it, the size it had on collapse is restored. **To Reproduce** Steps to reproduce the behavior: 1. Have a page with ``` <RadzenSplitter Orientation="Orientation.Horizontal"> <RadzenSplitterPane Collapsible="false"> Left pane </RadzenSplitterPane> <RadzenSplitterPane Collapsible="true" Collapsed="true" Size="300px"> Right pane </RadzenSplitterPane> </RadzenSplitter> ```` 2. Expand the right pane Pane expands with size 0 -> Error, should restore with 300px 3. Drag splitter to give right pane some size 4. Collapse right pane 5. Expand right pane Right pane restores size as expected **Expected behavior** When the right pane is expanded the 1st time, it should have the configured Size of 300px. **Desktop (please complete the following information):** - OS: Windows 11 - Browser: Edge - Version: 4.31.5
Author
Owner

@enchev commented on GitHub (May 22, 2024):

The problem comes from the fact that the non collapsible pane do not have any size defined and will use 100%. You can avoid this by defining some size:

<RadzenSplitter Orientation="Orientation.Horizontal">
    <RadzenSplitterPane Collapsible="false" Size="300px">
        Left pane
    </RadzenSplitterPane>

    <RadzenSplitterPane Collapsible="true" Collapsed="true" Size="300px">
        Right pane
    </RadzenSplitterPane>
</RadzenSplitter>
@enchev commented on GitHub (May 22, 2024): The problem comes from the fact that the non collapsible pane do not have any size defined and will use 100%. You can avoid this by defining some size: ``` <RadzenSplitter Orientation="Orientation.Horizontal"> <RadzenSplitterPane Collapsible="false" Size="300px"> Left pane </RadzenSplitterPane> <RadzenSplitterPane Collapsible="true" Collapsed="true" Size="300px"> Right pane </RadzenSplitterPane> </RadzenSplitter> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1237