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

Proposal for #5463: Add a resetState method to splitter to manually reset state #6394

Merged

Conversation

mehdirande
Copy link

Hello,

I'm encountering the issue #5463, and I don't think the approach proposed by matansha is ideal. Recalculating the "initial" state on every component update will reset user resize actions each time the component is updated, making it unusable.

One potential solution could be for the Splitter to observe changes on the size property of each SplitterPanel. However, this seems risky because these values might be updated simultaneously across all panels, leading to unintended frequent updates.

A more straightforward approach could be to introduce a reset function on the Splitter component, allowing users to manually re-run the initialization code (initializeState).

For those who want permanent synchronization, they could add a watcher on the size props to trigger a reset on each update.

resolves #5463

Copy link

vercel bot commented Sep 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Sep 12, 2024 2:58pm
primevue-v3 ⬜️ Ignored (Inspect) Visit Preview Sep 12, 2024 2:58pm

@tugcekucukoglu tugcekucukoglu merged commit 00d7470 into primefaces:master Sep 24, 2024
4 checks passed
@calebpitan
Copy link

Hello, thank you for making Primevue more and more usable.

I would love to know if this has been released yet, because I'm on the latest release and still experience the issue this PR addresses?

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

Successfully merging this pull request may close these issues.

Splitter/SplitterPanel: size not updated
3 participants