Skip to content

Commit 02ada08

Browse files
committed
VCST-2300: remove empty objects from ui grid state (#2866)
1 parent 10d5fcf commit 02ada08

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/VirtoCommerce.Platform.Web/wwwroot/js/common/uiGridUtils.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,15 @@ angular.module('platformWebApp')
5959

6060
if (gridApi.saveState) {
6161
if (savedState) {
62-
//$timeout(function () {
62+
63+
Object.keys(savedState).forEach(function (key) {
64+
const value = savedState[key];
65+
if (_.isEmpty(value)) {
66+
savedState[key] = undefined;
67+
}
68+
});
69+
6370
gridApi.saveState.restore($scope, savedState);
64-
//}, 10);
6571
}
6672

6773
if (gridApi.colResizable)

0 commit comments

Comments
 (0)