@webitel/ui-sdk 3.2.25 → 3.2.27
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
|
@@ -73,10 +73,12 @@ export default class FiltersStoreModule extends BaseStoreModule {
|
|
|
73
73
|
});
|
|
74
74
|
},
|
|
75
75
|
// eslint-disable-next-line consistent-return
|
|
76
|
-
RESTORE_FILTER: (context, { filter }) => {
|
|
76
|
+
RESTORE_FILTER: async (context, { filter }) => {
|
|
77
77
|
const value = context.getters.GET_VALUE_FROM_QUERY({ filterQuery: filter });
|
|
78
|
-
if (
|
|
79
|
-
|
|
78
|
+
if (value) {
|
|
79
|
+
if (filter === 'sort') await context.dispatch('RESTORE_SORT', { value });
|
|
80
|
+
return context.dispatch('SET_FILTER', ({ filter, value }));
|
|
81
|
+
}
|
|
80
82
|
},
|
|
81
83
|
RESTORE_FILTERS: (context) => {
|
|
82
84
|
Object.keys(context.state)
|
|
@@ -108,9 +108,11 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
108
108
|
RESTORE_SORT_FROM_FILTER: (context, { value }) => {
|
|
109
109
|
const sort = queryToSortAdapter(value.slice(0, 1));
|
|
110
110
|
const header = sort ? value.slice(1) : value;
|
|
111
|
+
console.info('prev', value);
|
|
111
112
|
return context.dispatch('UPDATE_HEADER_SORT', { header, nextSortOrder: sort });
|
|
112
113
|
},
|
|
113
114
|
UPDATE_HEADER_SORT: (context, { header, nextSortOrder }) => {
|
|
115
|
+
console.info(header, nextSortOrder);
|
|
114
116
|
const headers = context.state.headers.map((oldHeader) => {
|
|
115
117
|
// eslint-disable-next-line no-prototype-builtins
|
|
116
118
|
if (oldHeader.sort !== undefined) {
|