Skip to content

Commit

Permalink
fix: searchTerm was overwrite during initialization (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed May 7, 2024
1 parent 97e54ee commit f6ab949
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/radix-vue/src/Combobox/ComboboxRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ watch(stringifiedModelValue, async () => {
await nextTick()
await nextTick()
resetSearchTerm()
}, { immediate: true })
}, {
// If searchTerm is provided with value during initialization, we don't reset it immediately
immediate: !props.searchTerm,
})
watch(() => filteredOptions.value.length, async (length) => {
await nextTick()
Expand Down

0 comments on commit f6ab949

Please sign in to comment.