@webitel/ui-sdk 3.2.29 → 3.2.31

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.29",
3
+ "version": "3.2.31",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -1,4 +1,5 @@
1
1
  import deepEqual from 'deep-equal';
2
+ import debounce from '../../../scripts/debounce';
2
3
  import isEmpty from '../../../scripts/isEmpty';
3
4
  import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule';
4
5
 
@@ -87,7 +88,7 @@ export default class FiltersStoreModule extends BaseStoreModule {
87
88
  RESET_FILTERS: (context) => {
88
89
  context.commit('RESET_FILTERS');
89
90
  },
90
- ON_FILTER_SET: (context, { filter, value }) => context.dispatch('LOAD_DATA_LIST'),
91
+ ON_FILTER_SET: debounce((context, { filter, value }) => context.dispatch('LOAD_DATA_LIST')),
91
92
 
92
93
  LOAD_DATA_LIST: (context) => context.dispatch(
93
94
  `${context.getters.TABLE_NAMESPACE}/LOAD_DATA_LIST`,
@@ -1,11 +1,2 @@
1
- const debounce = (method, delay = 1000) => {
2
- let timer;
3
- return (args) => {
4
- if (timer) clearTimeout(timer);
5
- timer = setTimeout(() => {
6
- method(args);
7
- }, delay);
8
- };
9
- };
10
-
1
+ import debounce from 'lodash.debounce';
11
2
  export default debounce;