@invopop/popui 0.0.28 → 0.0.30
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/BaseTable.svelte
CHANGED
|
@@ -31,6 +31,7 @@ export let selectable = false;
|
|
|
31
31
|
export let selectedRows = [];
|
|
32
32
|
export let selectedTrackedBy = "id";
|
|
33
33
|
export let hideSelectAll = false;
|
|
34
|
+
export let disableKeyboardNavigation = false;
|
|
34
35
|
$:
|
|
35
36
|
groupedData = groupData(data);
|
|
36
37
|
$:
|
|
@@ -63,6 +64,7 @@ function groupData(rows) {
|
|
|
63
64
|
function toggleAllSelected(selected) {
|
|
64
65
|
selectedRows = [];
|
|
65
66
|
lastSelected = {};
|
|
67
|
+
dispatch("selectAll", selected);
|
|
66
68
|
if (!selected)
|
|
67
69
|
return;
|
|
68
70
|
selectedRows = data;
|
|
@@ -99,6 +101,8 @@ function selectRange(to) {
|
|
|
99
101
|
selectedRows = [.../* @__PURE__ */ new Set([...selectedRows, ...itemsToSelect])];
|
|
100
102
|
}
|
|
101
103
|
function handleKeydown(event) {
|
|
104
|
+
if (disableKeyboardNavigation)
|
|
105
|
+
return;
|
|
102
106
|
if (isInputFocused()) {
|
|
103
107
|
return;
|
|
104
108
|
}
|
|
@@ -15,6 +15,7 @@ declare const __propDef: {
|
|
|
15
15
|
selectedRows?: TableDataRow[] | undefined;
|
|
16
16
|
selectedTrackedBy?: string | undefined;
|
|
17
17
|
hideSelectAll?: boolean | undefined;
|
|
18
|
+
disableKeyboardNavigation?: boolean | undefined;
|
|
18
19
|
};
|
|
19
20
|
events: {
|
|
20
21
|
orderBy: CustomEvent<any>;
|
|
@@ -24,6 +25,7 @@ declare const __propDef: {
|
|
|
24
25
|
rowClick: CustomEvent<any>;
|
|
25
26
|
rowRightClick: CustomEvent<any>;
|
|
26
27
|
tableEndReached: CustomEvent<any>;
|
|
28
|
+
selectAll: CustomEvent<any>;
|
|
27
29
|
} & {
|
|
28
30
|
[evt: string]: CustomEvent<any>;
|
|
29
31
|
};
|