@isoftdata/svelte-table 2.6.0 → 2.6.2
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/Td.svelte +6 -6
- package/dist/Td.svelte.d.ts +7 -7
- package/package.json +1 -1
package/dist/Td.svelte
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
* `left` and `right`should only be used while you transition to Boostrap 5+
|
|
21
21
|
*/
|
|
22
22
|
align?: 'start' | 'left' | 'center' | 'right' | 'end'
|
|
23
|
-
/** If enabled, pressing enter while focused in this Td will focus the next non-disabled input/select/textarea in the column. Holding shift will go up instead of down
|
|
24
|
-
enterGoesDown?: boolean | ((ctx: { lastIndex: number; newIndex: number }) => void)
|
|
25
|
-
/** If enabled, keypress (enter only) and click events on the Td's contents will have `stopPropagation`/`preventDefault` called on them.
|
|
23
|
+
/** If enabled, pressing enter while focused in this Td will focus the next non-disabled input/select/textarea in the column. Holding shift will go up instead of down.
|
|
26
24
|
*
|
|
27
|
-
* Can also be a callback
|
|
25
|
+
* Can also be a callback that is fired when the enter key is used to move between rows.
|
|
28
26
|
*/
|
|
27
|
+
enterGoesDown?: boolean | ((ctx: { event: KeyboardEvent; tr: HTMLTableRowElement }) => void)
|
|
28
|
+
/** If enabled, keypress (enter only) and click events on the Td's contents will have `stopPropagation`/`preventDefault` called on them. */
|
|
29
29
|
stopPropagation?: boolean
|
|
30
30
|
children?: Snippet
|
|
31
31
|
}
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
theTd?.querySelector<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>('input,select,textarea')?.focus()
|
|
88
88
|
if (typeof enterGoesDown === 'function') {
|
|
89
89
|
enterGoesDown({
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
tr: allTrs[newTrIndex] as HTMLTableRowElement,
|
|
91
|
+
event,
|
|
92
92
|
})
|
|
93
93
|
}
|
|
94
94
|
}
|
package/dist/Td.svelte.d.ts
CHANGED
|
@@ -10,15 +10,15 @@ interface Props extends Omit<HTMLTdAttributes, 'align'> {
|
|
|
10
10
|
* `left` and `right`should only be used while you transition to Boostrap 5+
|
|
11
11
|
*/
|
|
12
12
|
align?: 'start' | 'left' | 'center' | 'right' | 'end';
|
|
13
|
-
/** If enabled, pressing enter while focused in this Td will focus the next non-disabled input/select/textarea in the column. Holding shift will go up instead of down
|
|
14
|
-
enterGoesDown?: boolean | ((ctx: {
|
|
15
|
-
lastIndex: number;
|
|
16
|
-
newIndex: number;
|
|
17
|
-
}) => void);
|
|
18
|
-
/** If enabled, keypress (enter only) and click events on the Td's contents will have `stopPropagation`/`preventDefault` called on them.
|
|
13
|
+
/** If enabled, pressing enter while focused in this Td will focus the next non-disabled input/select/textarea in the column. Holding shift will go up instead of down.
|
|
19
14
|
*
|
|
20
|
-
* Can also be a callback
|
|
15
|
+
* Can also be a callback that is fired when the enter key is used to move between rows.
|
|
21
16
|
*/
|
|
17
|
+
enterGoesDown?: boolean | ((ctx: {
|
|
18
|
+
event: KeyboardEvent;
|
|
19
|
+
tr: HTMLTableRowElement;
|
|
20
|
+
}) => void);
|
|
21
|
+
/** If enabled, keypress (enter only) and click events on the Td's contents will have `stopPropagation`/`preventDefault` called on them. */
|
|
22
22
|
stopPropagation?: boolean;
|
|
23
23
|
children?: Snippet;
|
|
24
24
|
}
|