ankiutils 0.0.6 → 0.0.8
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { tick } from 'svelte';
|
|
2
3
|
import { type SelectOption } from './types.js';
|
|
3
4
|
import { filterSelectOptions } from './utils.js';
|
|
4
5
|
interface Props {
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
function selectOption(language: SelectOption) {
|
|
35
36
|
selectedOption = language.value;
|
|
36
37
|
modalElement.close();
|
|
37
|
-
onSelected?.();
|
|
38
|
+
tick().then(() => onSelected?.());
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
export function show() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { tick } from 'svelte';
|
|
2
3
|
import { type SelectOption } from './types.js';
|
|
3
4
|
interface Props {
|
|
4
5
|
options: SelectOption[];
|
|
@@ -45,11 +46,11 @@
|
|
|
45
46
|
selectedOptions = [option.value];
|
|
46
47
|
closeDropdown();
|
|
47
48
|
}
|
|
48
|
-
onSelected?.(selectedOptions);
|
|
49
|
+
tick().then(() => onSelected?.(selectedOptions));
|
|
49
50
|
}
|
|
50
51
|
</script>
|
|
51
52
|
|
|
52
|
-
<div class="menu dropdown-content bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm gap-1">
|
|
53
|
+
<div class="menu dropdown-content flex-nowrap max-h-46 overflow-auto bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm gap-1">
|
|
53
54
|
{#if options.length === 0}
|
|
54
55
|
<div class="text-gray-400">No options found</div>
|
|
55
56
|
{:else}
|