refactor admin crud popups
All checks were successful
deploy / build-and-deploy (push) Successful in 23s

This commit is contained in:
2025-05-21 17:22:20 +02:00
parent 8b18623232
commit e47268111a
46 changed files with 889 additions and 1041 deletions

View File

@@ -20,7 +20,7 @@
let { id, value = $bindable(), label, readonly, required, mustMatch, requestSuggestions, onSubmit }: Props = $props();
// states
let inputValue = $state(value);
let inputValue = $derived(value);
let suggestions = $state<string[]>([]);
let matched = $state(false);
@@ -38,7 +38,7 @@
if (suggestion != null) {
inputValue = value = suggestion;
matched = true;
onSubmit?.(value);
onSubmit?.(suggestion);
} else if (!mustMatch) {
value = inputValue;
matched = false;
@@ -52,7 +52,7 @@
function onSuggestionClick(suggestion: string) {
inputValue = value = suggestion;
suggestions = [];
onSubmit?.(value);
onSubmit?.(suggestion);
}
</script>