Skip to content

Commit

Permalink
feat: use vue native watch
Browse files Browse the repository at this point in the history
  • Loading branch information
RayGuo-ergou committed Oct 13, 2024
1 parent 3b8ea66 commit cac99ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/Combobox/ComboboxRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface ComboboxRootProps<T = AcceptableValue> extends Omit<ListboxRoot
<script setup lang="ts" generic="T extends AcceptableValue = AcceptableValue">
import { computed, nextTick, reactive, ref, toRefs, watch } from 'vue'
import { PopperRoot } from '@/Popper'
import { type EventHookOn, createEventHook, useVModel, watchDebounced } from '@vueuse/core'
import { type EventHookOn, createEventHook, useVModel } from '@vueuse/core'
import { ListboxRoot } from '@/Listbox'
const props = withDefaults(defineProps<ComboboxRootProps<T>>(), {
Expand Down Expand Up @@ -181,9 +181,9 @@ watch(() => open.value, () => {
})
}, { flush: 'post' })
watchDebounced(() => allItems.value.size, (val) => {
watch(() => allItems.value.size, (val) => {
filterItems()
}, { debounce: 10 })
})
defineExpose({
highlightedElement,
Expand Down

0 comments on commit cac99ff

Please sign in to comment.