@bimdata/design-system 2.1.0-rc.27 → 2.1.0-rc.29
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
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
<th class="cell-checkbox" v-if="selectable">
|
|
13
13
|
<BIMDataCheckbox
|
|
14
14
|
:disabled="rows.length === 0"
|
|
15
|
-
:modelValue="
|
|
16
|
-
rows.length > 0 && rowSelection.size === rows.length
|
|
17
|
-
"
|
|
15
|
+
:modelValue="selectionState"
|
|
18
16
|
@update:modelValue="toggleAll"
|
|
19
17
|
/>
|
|
20
18
|
</th>
|
|
@@ -278,6 +276,14 @@ export default {
|
|
|
278
276
|
}
|
|
279
277
|
);
|
|
280
278
|
|
|
279
|
+
const selectionState = computed(() =>
|
|
280
|
+
rowSelection.value.size < props.rows.length
|
|
281
|
+
? rowSelection.value.size > 0
|
|
282
|
+
? null
|
|
283
|
+
: false
|
|
284
|
+
: rowSelection.value.size > 0
|
|
285
|
+
);
|
|
286
|
+
|
|
281
287
|
const toggleRow = row => {
|
|
282
288
|
if (props.selectable) {
|
|
283
289
|
toggleRowSelection(row);
|
|
@@ -470,6 +476,7 @@ export default {
|
|
|
470
476
|
displayedColumnFilterId,
|
|
471
477
|
filteringColumns,
|
|
472
478
|
filters,
|
|
479
|
+
selectionState,
|
|
473
480
|
sortObject,
|
|
474
481
|
// Methods
|
|
475
482
|
awayFromFilter,
|
|
@@ -49,7 +49,7 @@ function useRowSelection(
|
|
|
49
49
|
rowSelectionToggleEffect(isSelected(), { key, data });
|
|
50
50
|
};
|
|
51
51
|
const toggleFullSelection = () => {
|
|
52
|
-
const isSelected = () => rowSelection.value.size
|
|
52
|
+
const isSelected = () => rowSelection.value.size > 0;
|
|
53
53
|
if (isSelected()) {
|
|
54
54
|
rowSelection.value = new Map();
|
|
55
55
|
} else {
|