y200subcontrols 0.1.1 → 0.1.3
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.
|
@@ -31,7 +31,7 @@ function handleKeyDown(event) {
|
|
|
31
31
|
filterElements();
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
export function reset() {
|
|
35
35
|
let options = select.querySelectorAll("option");
|
|
36
36
|
elements = [];
|
|
37
37
|
for (const option of options) {
|
|
@@ -41,17 +41,15 @@ onMount(() => {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
filterElements();
|
|
44
|
+
}
|
|
45
|
+
onMount(() => {
|
|
46
|
+
reset();
|
|
44
47
|
});
|
|
45
48
|
</script>
|
|
46
49
|
|
|
47
|
-
<div class="w-full h-full
|
|
50
|
+
<div class="w-full h-full pt-2 flex flex-col">
|
|
48
51
|
<slot name="header" />
|
|
49
|
-
<select
|
|
50
|
-
bind:this={select}
|
|
51
|
-
class="hidden"
|
|
52
|
-
bind:value
|
|
53
|
-
{name}
|
|
54
|
-
>
|
|
52
|
+
<select bind:this={select} class="hidden" bind:value {name}>
|
|
55
53
|
<slot />
|
|
56
54
|
</select>
|
|
57
55
|
<div class="flex px-1">
|
|
@@ -68,7 +66,7 @@ onMount(() => {
|
|
|
68
66
|
dark:bg-slate-900
|
|
69
67
|
dark:border-slate-600 border-slate-300 focus:ring-teal-500/20 dark:focus:ring-teal-500/30
|
|
70
68
|
"
|
|
71
|
-
|
|
69
|
+
{placeholder}
|
|
72
70
|
bind:value={searchQuery}
|
|
73
71
|
on:keydown={handleKeyDown}
|
|
74
72
|
/>
|
|
@@ -5,6 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
name?: string | undefined;
|
|
6
6
|
searchQuery?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
|
+
reset?: () => void;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
change: CustomEvent<any>;
|
|
@@ -23,5 +24,6 @@ export type ListBoxProps = typeof __propDef.props;
|
|
|
23
24
|
export type ListBoxEvents = typeof __propDef.events;
|
|
24
25
|
export type ListBoxSlots = typeof __propDef.slots;
|
|
25
26
|
export default class ListBox extends SvelteComponent<ListBoxProps, ListBoxEvents, ListBoxSlots> {
|
|
27
|
+
get reset(): () => void;
|
|
26
28
|
}
|
|
27
29
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "y200subcontrols",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"type": "module",
|
|
55
55
|
"license": "MIT",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"bootstrap-icons": "^1.11.3"
|
|
58
|
-
|
|
57
|
+
"bootstrap-icons": "^1.11.3"
|
|
58
|
+
|
|
59
59
|
}
|
|
60
60
|
}
|