@r2digisolutions/components 0.14.13 → 0.14.14

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.
@@ -179,8 +179,17 @@
179
179
  });
180
180
  }
181
181
 
182
+ function commitPendingQuery() {
183
+ const trimmed = query.trim();
184
+ if (!creatable || !trimmed || trimmed === value) return;
185
+ value = trimmed;
186
+ onchange?.(trimmed);
187
+ }
188
+
182
189
  function onPopoverClose() {
190
+ commitPendingQuery();
183
191
  if (selected) query = selected.label;
192
+ else if (value) query = value;
184
193
  else if (!creatable) query = '';
185
194
  }
186
195
 
@@ -300,8 +309,11 @@
300
309
  }
301
310
 
302
311
  $effect(() => {
303
- if (selected && !open && query !== selected.label) {
312
+ if (open) return;
313
+ if (selected && query !== selected.label) {
304
314
  query = selected.label;
315
+ } else if (value && query !== value) {
316
+ query = value;
305
317
  }
306
318
  });
307
319
 
@@ -75,8 +75,9 @@
75
75
  }
76
76
  </script>
77
77
 
78
- <div class={['w-full space-y-1', className]}>
78
+ <div class="w-full space-y-1">
79
79
  <Combobox
80
+ class={className}
80
81
  {label}
81
82
  {placeholder}
82
83
  {options}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.14.13",
3
+ "version": "0.14.14",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",