Skip to content

Commit 75b09ca

Browse files
committed
Fix
1 parent b6b79a3 commit 75b09ca

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ class Stepper extends CollectionWidgetAsync<StepperProperties> {
272272

273273
_renderConnector(): void {
274274
if (this._connector) {
275-
this._connector.option(this._getConnectorOptions());
276275
return;
277276
}
278277

@@ -454,6 +453,10 @@ class Stepper extends CollectionWidgetAsync<StepperProperties> {
454453
case 'hintExpr':
455454
this._invalidate();
456455
break;
456+
case 'items':
457+
this._connector.option(this._getConnectorOptions());
458+
super._optionChanged(args);
459+
break;
457460
default:
458461
super._optionChanged(args);
459462
}

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,18 +311,16 @@ QUnit.module('Connector integration', moduleConfig, () => {
311311
});
312312
});
313313

314-
QUnit.test('connector should update its size if stepper repaint was called (T1312793)', function(assert) {
314+
QUnit.test('connector should update its size on items mutation (T1312793)', function(assert) {
315315
const items = [{}, {}];
316316
this.reinit({ items });
317317

318318
const sizeBefore = this.getConnector().option('size');
319-
320319
items.push({});
321-
this.instance.repaint();
322-
320+
this.instance.option('items', items);
323321
const sizeAfter = this.getConnector().option('size');
324322

325-
assert.strictEqual(sizeAfter > sizeBefore, true, 'connector size is updated after repaint');
323+
assert.strictEqual(sizeAfter > sizeBefore, true, 'connector size is updated after items mutation');
326324
});
327325
});
328326

0 commit comments

Comments
 (0)