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

Splitter: Changed behavior in 8.x, when more than two panels are are used #2830

Closed
martastain opened this issue May 2, 2022 · 6 comments · Fixed by #2832
Closed

Splitter: Changed behavior in 8.x, when more than two panels are are used #2830

martastain opened this issue May 2, 2022 · 6 comments · Fixed by #2832
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@martastain
Copy link

martastain commented May 2, 2022

Describe the bug

In 7.x, it was possible to have more than two panels in a Splitter.

In 8.0.1, when three panels are used, grabbing the split between panels 1 and 2 actually moves the split between panels 2 and 3, and it is no longer possible to resize the first panel.

Reproducer

https://codesandbox.io/s/primereact-test-forked-ny8eo9

PrimeReact version

8.0.1

React version

18.x

Language

ES6

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome 101.0.4951.41 (Official Build) (64-bit) Linux

Steps to reproduce the behavior

  1. Create a Splitter component with three SplitterPanels
  2. Try to resize the first split

Expected behavior

No response

@martastain martastain added the Type: Bug Issue contains a defect related to a specific component. label May 2, 2022
@melloware
Copy link
Member

melloware commented May 2, 2022

Your code sandbox reproducer looks like its the default and not showing the issue?

@melloware
Copy link
Member

Also the Showcase on 8.0.1 has 3 splitters in the bottom example and appears to be working OK?

See: https://primefaces.org/primereact/splitter/

@melloware melloware added Resolution: Needs More Information More information about the issue is needed to find a correct solution Type: Bug Issue contains a defect related to a specific component. and removed Type: Bug Issue contains a defect related to a specific component. Resolution: Needs More Information More information about the issue is needed to find a correct solution labels May 2, 2022
@martastain
Copy link
Author

I'm sorry about the link - it was unsaved:
https://codesandbox.io/s/primereact-test-splitter-with-three-panels-ny8eo9?file=/src/index.js

the example in the showcase uses a nested splitter, not three panels within one splitter container. Nesting works in 8.0.1, but it is not an elegant solution in case you have three panels with same level of importance.

@melloware
Copy link
Member

yep i see the problem now!

melloware added a commit to melloware/primereact that referenced this issue May 2, 2022
@melloware melloware self-assigned this May 2, 2022
@melloware melloware added this to the 8.1.0 milestone May 2, 2022
@melloware
Copy link
Member

OK I pushed a PR to fix it.

@melloware
Copy link
Member

Thanks for the excellent report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants