Splitter: size of panes should be updated taking into account their limitations on splitter resize#32862
Merged
pharret31 merged 11 commits intoDevExpress:26_1from Mar 30, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Splitter’s dimension-change handling so pane sizes/layout are recalculated in a way that respects pane constraints (min/max/fixed sizes) when the splitter is resized, and expands the QUnit coverage for these scenarios.
Changes:
- Reorders
_dimensionChanged()to recalculate layout, apply it to DOM, then update stored item sizes. - Updates an existing resizing test expectation to match the new constraint-aware behavior.
- Adds a set of new tests validating that
minSize/maxSizeconstraints are respected after splitter width changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js | Updates one existing resize test and adds new cases covering constraint enforcement after dimension changes. |
| packages/devextreme/js/__internal/ui/splitter/splitter.ts | Changes dimension-change flow to apply the recalculated layout before persisting new pane sizes. |
cac954d to
49bbb53
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/devextreme/js/__internal/ui/splitter/splitter.ts:692
_initialPaneSizesis only captured during_renderItems(). If a consumer setsitems[i].sizeat runtime (especially for aresizable: falsepane), the new explicit size won't be reflected in_initialPaneSizes, so subsequent dimension changes may treat it as "no explicit size" and allow it to scale. Consider updating_initialPaneSizes[index]when handling the'size'item option change so runtime updates behave consistently.
switch (property) {
case 'size':
this._layout = this._getDefaultLayoutBasedOnSize(item);
this._idealLayout = this._layout;
this._applyStylesFromLayout(this.getLayout());
this._updateItemSizes();
break;
dmlvr
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.