primefaces / primefaces/primereact
SplitterPanel: size property is not respected after the splitter has been moved with the mouse
Nobody has claimed this yet.
- 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
- After starting the reproducr, enter a percentage value in the text input, the SplitterPanels will size accordingly
- Drag the gutter with the mouse
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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