Skip to content

Conversation

@tomkp
Copy link
Owner

@tomkp tomkp commented Dec 29, 2025

Summary

Fixes #861

When using SplitPane in controlled mode with size props on Pane components, resetting the sizes (e.g., via a "Reset" button) did not update the UI. The internal paneSizes state was not syncing with the controlled size props after changes.

  • Added an effect to sync paneSizes with controlled size props when they change
  • Added a test case to verify controlled size updates work correctly

Test plan

  • Existing tests pass
  • New test case verifies the fix
  • npm run checks passes (typecheck, lint, format, test)

Fixes #861

When using SplitPane in controlled mode with `size` props on Pane
components, resetting the sizes (e.g., via a "Reset" button) did not
update the UI. The internal `paneSizes` state was not syncing with
the controlled `size` props after changes.

Added an effect to sync `paneSizes` with controlled size props when
they change, ensuring the UI reflects parent state updates.
@tomkp tomkp merged commit 1f48a4d into master Dec 29, 2025
1 check passed
@tomkp tomkp deleted the fix/controlled-size-sync-861 branch December 29, 2025 18:13
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.

Controlled example is broken

2 participants