Skip to content

Commit 27fb34e

Browse files
committed
fix(Combobox): empty should based on search value
1 parent 9004904 commit 27fb34e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/core/src/Combobox/ComboboxEmpty.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import { Primitive } from '@/Primitive'
1212
const props = defineProps<ComboboxEmptyProps>()
1313
const rootContext = injectComboboxRootContext()
1414
15-
const isRender = computed(() => rootContext.ignoreFilter.value ? rootContext.allItems.value.size === 0 : rootContext.filterState.filtered.count === 0)
15+
const isRender = computed(() => rootContext.ignoreFilter.value
16+
? rootContext.allItems.value.size === 0
17+
: !!rootContext.filterState.search && rootContext.filterState.filtered.count === 0,
18+
)
1619
</script>
1720

1821
<template>

0 commit comments

Comments
 (0)