diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml index caca8151ec884a67d73872722ce6da1fb457d491..5fab2d04f220978048d990a527cef34e647196e6 100644 --- a/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml +++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml @@ -24,7 +24,7 @@ <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item> <item name="update_url" xsi:type="url" path="mui/index/render"/> <item name="storageConfig" xsi:type="array"> - <item name="dataNamespace" xsi:type="string">filters.store_id</item> + <item name="dataScope" xsi:type="string">filters.store_id</item> </item> </item> </argument> diff --git a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js index 3d0828b3b1c26058277210803296dcbc708fb6b2..b90138a47b842f4d7428bc5bc12a98e0ee130ca5 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/data-storage.js @@ -20,7 +20,7 @@ define([ method: 'GET', dataType: 'json' }, - dataNamespace: '', + dataScope: '', data: {} }, @@ -30,14 +30,14 @@ define([ * @returns {DataStorage} Chainable. */ initConfig: function () { - var namespace; + var scope; this._super(); - namespace = this.dataNamespace; + scope = this.dataScope; - if (typeof namespace === 'string') { - this.dataNamespace = namespace ? [namespace] : []; + if (typeof scope === 'string') { + this.dataScope = scope ? [scope] : []; } this._requests = []; @@ -88,7 +88,7 @@ define([ getData: function (params, options) { var cachedRequest; - if (this.hasNamespaceChanged(params)) { + if (this.hasScopeChanged(params)) { this.clearRequests(); } else { cachedRequest = this.getRequest(params); @@ -102,15 +102,15 @@ define([ }, /** - * Tells whether one of the parameters defined in the "dataNamespace" has + * Tells whether one of the parameters defined in the "dataScope" has * changed since the last request. * * @param {Object} params - Request parameters. * @returns {Boolean} */ - hasNamespaceChanged: function (params) { + hasScopeChanged: function (params) { var lastRequest = _.last(this._requests), - paths, + keys, diff; if (!lastRequest) { @@ -118,9 +118,11 @@ define([ } diff = utils.compare(lastRequest.params, params); - paths = _.pluck(diff.changes, 'path').concat(_.keys(diff.containers)); - return _.intersection(this.dataNamespace, paths).length > 0; + keys = _.pluck(diff.changes, 'path'); + keys = keys.concat(Object.keys(diff.containers)); + + return _.intersection(this.dataScope, keys).length > 0; }, /**