@webitel/ui-sdk 3.2.42 → 3.2.43
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
|
@@ -18,21 +18,15 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
18
18
|
// required fields to send as "fields" param with GET_LIST
|
|
19
19
|
REQUIRED_FIELDS: () => ['id'],
|
|
20
20
|
|
|
21
|
-
// fields to send with GET_LIST
|
|
22
|
-
FIELDS: (state) => {
|
|
23
|
-
let fields = state.headers
|
|
24
|
-
.filter((header) => header.show)
|
|
25
|
-
.map((header) => header.field);
|
|
26
|
-
fields = [...new Set(fields)];
|
|
27
|
-
return fields;
|
|
28
|
-
},
|
|
29
|
-
|
|
30
21
|
// main GET_LIST params collector
|
|
31
22
|
GET_LIST_PARAMS: (state, getters) => (overrideFilters) => {
|
|
32
|
-
const fields = getters.FIELDS.concat(getters.REQUIRED_FIELDS);
|
|
33
|
-
|
|
34
23
|
const filters = getters.GET_FILTERS || getters['filters/GET_FILTERS'];
|
|
35
24
|
|
|
25
|
+
const fields = (filters.fields || [
|
|
26
|
+
...new Set(state.headers.filter((header) => header.show)
|
|
27
|
+
.map((header) => header.field)),
|
|
28
|
+
]).concat(getters.REQUIRED_FIELDS);
|
|
29
|
+
|
|
36
30
|
return {
|
|
37
31
|
...filters,
|
|
38
32
|
fields,
|
|
@@ -102,7 +96,7 @@ export default class TableStoreModule extends BaseStoreModule {
|
|
|
102
96
|
...header,
|
|
103
97
|
show: value.includes(header.field),
|
|
104
98
|
}));
|
|
105
|
-
return
|
|
99
|
+
return context.dispatch('SET_HEADERS', headers);
|
|
106
100
|
},
|
|
107
101
|
SET_HEADERS: (context, headers) => context.commit('SET_HEADERS', headers),
|
|
108
102
|
SORT: async (context, { header, nextSortOrder }) => {
|