diff --git a/packages/vue/src/components/list-box/ListBox.vue b/packages/vue/src/components/list-box/ListBox.vue index 4e92eda..45d5f92 100644 --- a/packages/vue/src/components/list-box/ListBox.vue +++ b/packages/vue/src/components/list-box/ListBox.vue @@ -24,7 +24,7 @@ import { useInheritedDisabled, disabledContextKey } from "../field/disabled"; import { useCollectionSelection } from "../collection/selection"; import { useCollectionRegistry } from "../collection/registry"; import { collectionOwnerKey } from "../collection/owner"; -import { assertKey } from "../collection/keys"; +import { assertKey, encodeKey } from "../collection/keys"; import { listBoxKey, type ListBoxDataItem, @@ -284,7 +284,7 @@ const virtualRows = computed(() => { (typeof props.rowHeight === "function" ? props.rowHeight(index) : props.rowHeight) ?? fallbackRowHeight.value; - push({ key: `item-${item.id}`, kind: "item", height, item, index }); + push({ key: `item-${encodeKey(item.id)}`, kind: "item", height, item, index }); }); if (slots.loader) push({ key: "loader", kind: "loader", height: props.loaderHeight }); diff --git a/tests/fixtures/virtual-rows.vue b/tests/fixtures/virtual-rows.vue index 3b674db..db071bc 100644 --- a/tests/fixtures/virtual-rows.vue +++ b/tests/fixtures/virtual-rows.vue @@ -1,5 +1,13 @@