Skip to content
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

Initially collapsed SplitterPane has size 0 on first expand #1519

Closed
osre77 opened this issue May 19, 2024 · 1 comment
Closed

Initially collapsed SplitterPane has size 0 on first expand #1519

osre77 opened this issue May 19, 2024 · 1 comment

Comments

@osre77
Copy link

osre77 commented 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
@enchev
Copy link
Collaborator

enchev commented 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 enchev closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants