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: local storage sync is not working #5916

Closed
v8ru opened this issue Feb 7, 2024 · 0 comments · Fixed by #5939
Closed

Splitter: local storage sync is not working #5916

v8ru opened this issue Feb 7, 2024 · 0 comments · Fixed by #5939
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@v8ru
Copy link

v8ru commented Feb 7, 2024

Describe the bug

When Splitter option stateStorage="local" (with stateKey using as well), local storage state saving very buggy. Sometimes value changes, but most cases it is static. Also, onResizeEnd event triggers buggy too.
I think there`s problem with onResizeEvent under the hood - something blocking its trigger or not trigger event as well.

Reproducer

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

PrimeReact version

10.5.0

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

chrome

Steps to reproduce the behavior

  1. Open preview in new tab to better experience
  2. Open local storage in developer tools application tab
  3. Drag splitter to any position (watch to local storage) - value can be wrong.
  4. Just reload preview - splitter can be on random (when min panel size value was set) or initial position
  5. Drag splitter more times
  6. Watch how local storage value has no affect or values wrong

Expected behavior

Local storage values must be changed when splitter drag ends. When tab reloads or on next visit, splitter must to load local storage value and be on the same position.

@v8ru v8ru added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 7, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 8, 2024
melloware added a commit to melloware/primereact that referenced this issue Feb 11, 2024
@melloware melloware self-assigned this Feb 11, 2024
@melloware melloware added this to the 10.5.1 milestone Feb 11, 2024
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.

2 participants