@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.2.39",
3
+ "version": "3.2.41",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -77,7 +77,10 @@ export default class FiltersStoreModule extends BaseStoreModule {
77
77
  });
78
78
  },
79
79
  RESTORE_FILTER: async (context, { filter }) => {
80
- const value = context.getters.GET_VALUE_FROM_QUERY({ filterQuery: filter });
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'), 1000),
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`,