Skip to content

Commit 04a9f44

Browse files
committed
Fix issue with saving filters from url-applier to default view of bookmark
1 parent d1ff2ca commit 04a9f44

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

app/code/Magento/Ui/view/base/web/js/grid/url-filter-applier.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ define([
1313
return Component.extend({
1414
defaults: {
1515
listingNamespace: null,
16+
bookmarkProvider: 'componentType = bookmark, ns = ${ $.listingNamespace }',
1617
filterProvider: 'componentType = filters, ns = ${ $.listingNamespace }',
1718
filterKey: 'filters',
1819
searchString: location.search,
1920
modules: {
21+
bookmarks: '${ $.bookmarkProvider }',
2022
filterComponent: '${ $.filterProvider }'
2123
}
2224
},
@@ -49,6 +51,16 @@ define([
4951
return;
5052
}
5153

54+
if (!_.isUndefined(this.bookmarks())) {
55+
if (!_.size(this.bookmarks().getViewData(this.bookmarks().defaultIndex))) {
56+
setTimeout(function () {
57+
this.apply();
58+
}.bind(this), 500);
59+
60+
return;
61+
}
62+
}
63+
5264
if (Object.keys(urlFilter).length) {
5365
applied = this.filterComponent().get('applied');
5466
filters = $.extend({}, applied, urlFilter);

0 commit comments

Comments
 (0)