@webitel/ui-sdk 3.2.39 → 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 }));
|
|
@@ -102,7 +105,7 @@ export default class FiltersStoreModule extends BaseStoreModule {
|
|
|
102
105
|
RESET_FILTERS: (context) => {
|
|
103
106
|
context.commit('RESET_FILTERS');
|
|
104
107
|
},
|
|
105
|
-
ON_FILTER_SET: debounce((context, { filter, value }) => context.dispatch('LOAD_DATA_LIST'),
|
|
108
|
+
ON_FILTER_SET: debounce((context, { filter, value }) => context.dispatch('LOAD_DATA_LIST'), 500),
|
|
106
109
|
|
|
107
110
|
LOAD_DATA_LIST: (context) => context.dispatch(
|
|
108
111
|
`${context.getters.TABLE_NAMESPACE}/LOAD_DATA_LIST`,
|