@webitel/ui-sdk 2.1.25 → 2.1.26
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/dist/ui-sdk.common.js +20 -10
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +20 -10
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +1 -1
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/organisms/wt-table/__tests__/WtTable.spec.js +1 -0
- package/src/components/organisms/wt-table/wt-table.vue +10 -3
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
v-for="(col, key) of dataHeaders"
|
|
14
14
|
:key="key"
|
|
15
15
|
:class="[
|
|
16
|
-
{'wt-table__th--sortable':
|
|
16
|
+
{'wt-table__th--sortable': isColSortable(col)},
|
|
17
17
|
`wt-table__th--sort-${col.sort}`,
|
|
18
18
|
]"
|
|
19
19
|
class="wt-table__th"
|
|
@@ -146,10 +146,17 @@ export default {
|
|
|
146
146
|
|
|
147
147
|
methods: {
|
|
148
148
|
sort(col) {
|
|
149
|
+
if (!this.isColSortable(col)) return;
|
|
149
150
|
const nextSort = getNextSortOrder(col.sort);
|
|
150
|
-
|
|
151
|
+
this.$emit('sort', col, nextSort);
|
|
152
|
+
},
|
|
153
|
+
isColSortable({ sort }) {
|
|
154
|
+
/* --sortable = sortable && col.sort === undefined cause there may be some columns we don't want to sort
|
|
155
|
+
strict check for === undefined is used because col.sort = null is sort order too (actualu, without sort)
|
|
156
|
+
so we need to check if this property is present
|
|
157
|
+
*/
|
|
158
|
+
return this.sortable && sort !== undefined;
|
|
151
159
|
},
|
|
152
|
-
|
|
153
160
|
selectAll() {
|
|
154
161
|
const { isAllSelected } = this;
|
|
155
162
|
// eslint-disable-next-line no-param-reassign,no-return-assign
|