fix: update items key

This commit is contained in:
Rizumu Ayaka
2026-01-23 18:58:06 +08:00
parent 72b02b6d0c
commit f4e8a785c2

View File

@@ -78,6 +78,8 @@ const maxSelectable = computed(() => {
return 1
})
const itemsKey = computed(() => props.items.map((item) => item.id).join('|'))
const filteredItems = ref<DropdownItem[]>([])
const defaultSorter = computed<SortOption['sorter']>(() => {
@@ -209,7 +211,7 @@ async function customSearcher(
:items="sortedItems"
:is-selected="internalIsSelected"
:max-selectable="maxSelectable"
:update-key="items"
:update-key="itemsKey"
@close="closeDropdown"
@item-click="handleSelection"
/>