From 19abbdd6fe49a1dbe16ced402dd4657d423bb152 Mon Sep 17 00:00:00 2001 From: Denys Rul Date: Tue, 27 Sep 2016 13:48:49 +0300 Subject: [PATCH] MAGETWO-58857: UI Grid won't load initial data until its state gets modified --- app/code/Magento/Ui/view/base/web/js/grid/provider.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Ui/view/base/web/js/grid/provider.js b/app/code/Magento/Ui/view/base/web/js/grid/provider.js index 92a4a6fd38cc5..7bca45d0253d0 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/provider.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/provider.js @@ -43,6 +43,10 @@ define([ .initStorage() .clearData(); + // Load data when there will + // be no more pending assets. + resolver(this.reload, this); + return this; }, @@ -122,9 +126,11 @@ define([ * Handles changes of 'params' object. */ onParamsChange: function () { - this.firstLoad ? - resolver(this.reload, this) : + // It's necessary to make a reload only + // after the initial loading has been made. + if (!this.firstLoad) { this.reload(); + } }, /**