Gallery widget selected index

This commit is contained in:
space-nuko
2023-05-05 21:21:56 -05:00
parent ad35826c7b
commit df4f2b2d57
7 changed files with 52 additions and 38 deletions

View File

@@ -7,6 +7,7 @@
export let name: string = "";
let value_: string = ""
$: value;
$: handleChange(value);
const dispatch = createEventDispatcher<{
@@ -16,6 +17,7 @@
}>();
function handleChange(val: string) {
console.debug("combo handleChange", val, value_)
if (val != value_)
dispatch("change", val);
value_ = val