From f1d6c0292272ec5a32a772a032bf03b92f9d973e Mon Sep 17 00:00:00 2001 From: Tomi Virkki Date: Fri, 20 Oct 2023 12:00:30 +0300 Subject: [PATCH] refactor: remove use of setProperties in grid items (#6678) --- .../vaadin-grid-array-data-provider-mixin.js | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/grid/src/vaadin-grid-array-data-provider-mixin.js b/packages/grid/src/vaadin-grid-array-data-provider-mixin.js index 8167ddea54..661525d80b 100644 --- a/packages/grid/src/vaadin-grid-array-data-provider-mixin.js +++ b/packages/grid/src/vaadin-grid-array-data-provider-mixin.js @@ -29,11 +29,9 @@ export const ArrayDataProviderMixin = (superClass) => __setArrayDataProvider(items) { const arrayDataProvider = createArrayDataProvider(this.items, {}); arrayDataProvider.__items = items; - this.setProperties({ - _arrayDataProvider: arrayDataProvider, - size: items.length, - dataProvider: arrayDataProvider, - }); + this._arrayDataProvider = arrayDataProvider; + this.size = items.length; + this.dataProvider = arrayDataProvider; } /** @private */ @@ -47,17 +45,13 @@ export const ArrayDataProviderMixin = (superClass) => if (dataProvider !== this._arrayDataProvider) { // A custom data provider was set externally - this.setProperties({ - _arrayDataProvider: undefined, - items: undefined, - }); + this._arrayDataProvider = undefined; + this.items = undefined; } else if (!items) { // The items array was unset - this.setProperties({ - _arrayDataProvider: undefined, - dataProvider: undefined, - size: 0, - }); + this._arrayDataProvider = undefined; + this.dataProvider = undefined; + this.size = 0; this.clearCache(); } else if (this._arrayDataProvider.__items === items) { // The items array was modified