@webitel/ui-sdk 3.2.166 → 3.2.167

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.166",
3
+ "version": "3.2.167",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -71,6 +71,17 @@ export default class TableStoreModule extends BaseStoreModule {
71
71
  items = [],
72
72
  next = false,
73
73
  } = await context.dispatch('api/GET_LIST', { context, params });
74
+
75
+ /* [https://my.webitel.com/browse/WTEL-3793]
76
+ * When deleting the last item from list,
77
+ * if there are other items on the previous page, you need to go back */
78
+ if (!items.length && params.page > 1) {
79
+ return context.dispatch('filters/SET_FILTER', {
80
+ filter: 'page',
81
+ value: params.page - 1,
82
+ });
83
+ }
84
+
74
85
  /* we should set _isSelected property to all items in tables cause their checkbox selection
75
86
  * is based on this property. Previously, this prop was set it api consumers, but now
76
87
  * admin-specific were replaced by webitel-sdk consumers and i supposed it will be