@webitel/ui-sdk 3.2.40 → 3.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -77,7 +77,10 @@ export default class FiltersStoreModule extends BaseStoreModule {
|
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
79
|
RESTORE_FILTER: async (context, { filter }) => {
|
|
80
|
-
const
|
|
80
|
+
const query = context.getters.GET_VALUE_FROM_QUERY({ filterQuery: filter });
|
|
81
|
+
// note: restore fn may still return value even if there's no query value
|
|
82
|
+
// from localStorage, for instance
|
|
83
|
+
const value = context.state[filter].restore ? context.state[filter].restore({ query }) : query;
|
|
81
84
|
if (value) {
|
|
82
85
|
if (filter === 'sort') await context.dispatch('RESTORE_SORT', { value });
|
|
83
86
|
await context.dispatch('SET_FILTER', ({ filter, value }));
|