primefaces / primefaces/primereact

SplitterPanel: size property is not respected after the splitter has been moved with the mouse

Open
#5,922 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Enhancement
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

In a Splitter, the size of the contained SplitterPanel components can be set with the size propety. However this only works as long as the gutter has not been moved with the mouse. After that, changing size has no effect anymore.

Reproducer

https://stackblitz.com/edit/otenfh?file=src%2FApp.jsx

PrimeReact version

10.5.0

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 121, Firefox 122

Steps to reproduce the behavior
  1. After starting the reproducr, enter a percentage value in the text input, the SplitterPanels will size accordingly
  2. Drag the gutter with the mouse
  3. Change the percentage in the text input again. The changed sizeproperty is ignored by the SplitterPanels
Expected behavior

Setting the size property should always be respected by the SplitterPanel component

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproducer and the SplitterPanel implementation. Reproduce the sequence of changing size, dragging the gutter, and changing size again, then trace how panel state is updated after dragging. Done means later size prop changes are respected in both Chrome and Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, vite
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.