Skip to content

Commit f98dee2

Browse files
committed
Fix
1 parent 75b09ca commit f98dee2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/devextreme/js/__internal/ui/stepper/stepper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ class Stepper extends CollectionWidgetAsync<StepperProperties> {
454454
this._invalidate();
455455
break;
456456
case 'items':
457-
this._connector.option(this._getConnectorOptions());
458457
super._optionChanged(args);
458+
this._connector.option(this._getConnectorOptions());
459459
break;
460460
default:
461461
super._optionChanged(args);

packages/devextreme/testing/tests/DevExpress.ui.widgets/stepper.tests.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,14 +313,18 @@ QUnit.module('Connector integration', moduleConfig, () => {
313313

314314
QUnit.test('connector should update its size on items mutation (T1312793)', function(assert) {
315315
const items = [{}, {}];
316-
this.reinit({ items });
316+
317+
this.reinit({ items, width: 100 });
317318

318319
const sizeBefore = this.getConnector().option('size');
319-
items.push({});
320+
321+
assert.roughEqual(sizeBefore, 50, 0.01, 'initial connector size is correct');
322+
323+
items.push({}, {});
320324
this.instance.option('items', items);
321325
const sizeAfter = this.getConnector().option('size');
322326

323-
assert.strictEqual(sizeAfter > sizeBefore, true, 'connector size is updated after items mutation');
327+
assert.roughEqual(sizeAfter, 75, 0.01, 'connector size is correct after items mutation');
324328
});
325329
});
326330

0 commit comments

Comments
 (0)