@14ch/svelte-ui 0.0.36 → 0.0.37
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.
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
...restProps
|
|
164
164
|
}: ComboboxProps = $props();
|
|
165
165
|
|
|
166
|
-
let inputValue = $state('');
|
|
166
|
+
let inputValue = $state(value != null ? String(value) : '');
|
|
167
167
|
let inputRef = $state<any>();
|
|
168
168
|
let listElement = $state<HTMLDivElement>();
|
|
169
169
|
let comboboxElement = $state<HTMLDivElement>();
|
|
@@ -173,6 +173,15 @@
|
|
|
173
173
|
let isFocused = $state(false);
|
|
174
174
|
let isKeyboardNavigation = $state(false);
|
|
175
175
|
|
|
176
|
+
// =========================================================================
|
|
177
|
+
// Effects
|
|
178
|
+
// =========================================================================
|
|
179
|
+
$effect(() => {
|
|
180
|
+
if (!isFocused) {
|
|
181
|
+
inputValue = value != null ? String(value) : '';
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
176
185
|
// =========================================================================
|
|
177
186
|
// Methods
|
|
178
187
|
// =========================================================================
|
|
@@ -447,7 +456,7 @@
|
|
|
447
456
|
{readonly}
|
|
448
457
|
{required}
|
|
449
458
|
{clearable}
|
|
450
|
-
rightIcon=
|
|
459
|
+
rightIcon="arrow_drop_down"
|
|
451
460
|
{tabindex}
|
|
452
461
|
{maxlength}
|
|
453
462
|
{rounded}
|