Skip to content

Commit

Permalink
fix(Combobox): empty should based on search value
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Aug 14, 2024
1 parent 9004904 commit 27fb34e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/Combobox/ComboboxEmpty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { Primitive } from '@/Primitive'
const props = defineProps<ComboboxEmptyProps>()
const rootContext = injectComboboxRootContext()
const isRender = computed(() => rootContext.ignoreFilter.value ? rootContext.allItems.value.size === 0 : rootContext.filterState.filtered.count === 0)
const isRender = computed(() => rootContext.ignoreFilter.value
? rootContext.allItems.value.size === 0
: !!rootContext.filterState.search && rootContext.filterState.filtered.count === 0,
)
</script>

<template>
Expand Down

0 comments on commit 27fb34e

Please # to comment.