Skip to content

Commit bff2530

Browse files
authored
Fix Combobox collection not updating on input (#3542)
1 parent a38546d commit bff2530

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/tame-jokes-brake.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@skeletonlabs/skeleton-svelte": patch
3+
---
4+
5+
bugfix: Fix Combobox collection not updating on input
6+

packages/skeleton-svelte/src/components/Combobox/Combobox.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
let options = $state.raw(data);
4949
const collection = $derived(
5050
combobox.collection({
51-
items: data,
51+
items: options,
5252
// Map data structure
5353
itemToValue: (item) => item.value,
5454
itemToString: (item) => item.label
@@ -66,7 +66,6 @@
6666
},
6767
onInputValueChange(event) {
6868
const filtered = data.filter((item) => item.label.toLowerCase().includes(event.inputValue.toLowerCase()));
69-
collection.setItems(filtered);
7069
options = filtered;
7170
zagProps.onInputValueChange?.(event);
7271
}

0 commit comments

Comments
 (0)