hamzus-ui 0.0.255 → 0.0.256
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.
package/package.json
CHANGED
|
@@ -47,7 +47,13 @@
|
|
|
47
47
|
|
|
48
48
|
$: handleChange(search);
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
$: updateSelection(selection ?? null)
|
|
51
|
+
|
|
52
|
+
function updateSelection(selection) {
|
|
53
|
+
if (!isMounted) return;
|
|
54
|
+
|
|
55
|
+
onChange(selection);
|
|
56
|
+
}
|
|
51
57
|
|
|
52
58
|
// fnctions
|
|
53
59
|
function formatInput(inputValue) {
|
|
@@ -188,9 +194,9 @@
|
|
|
188
194
|
{style}
|
|
189
195
|
{...$$restProps}
|
|
190
196
|
>
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
{#if required && !selection}
|
|
198
|
+
<input type="text" {name} {required} style="display: none;" />
|
|
199
|
+
{/if}
|
|
194
200
|
<div
|
|
195
201
|
class="input {errorMessage ? ' error' : ''}"
|
|
196
202
|
style="{variant == 'collapse'
|
|
@@ -283,9 +289,9 @@
|
|
|
283
289
|
<svelte:component this={component} selected={isSelected()} {...result} onClick={handleSelect}
|
|
284
290
|
></svelte:component>
|
|
285
291
|
{/each}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
292
|
+
{#if results.length === 0}
|
|
293
|
+
<slot name="nothing" />
|
|
294
|
+
{/if}
|
|
289
295
|
{#if results.length < totalOfRows}
|
|
290
296
|
<Button
|
|
291
297
|
label="charger plus"
|