2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

fix: allow typeAheadSelect only when option is selectable (#1529)

This commit is contained in:
Jeff Sagal
2022-02-17 16:57:27 -08:00
committed by GitHub
parent 0c72638d5e
commit 115f24aba2
5 changed files with 28 additions and 13 deletions
+8 -2
View File
@@ -9,11 +9,17 @@ import Vue from 'vue'
* @param Wrapper {Wrapper<Vue>}
* @param searchText
*/
export const searchSubmit = (Wrapper, searchText = false) => {
export const searchSubmit = async (Wrapper, searchText = false) => {
const search = Wrapper.findComponent({ ref: 'search' })
await search.trigger('focus')
if (searchText) {
Wrapper.vm.search = searchText
await Wrapper.vm.$nextTick()
}
Wrapper.findComponent({ ref: 'search' }).trigger('keydown.enter')
await search.trigger('keydown.enter')
await Wrapper.vm.$nextTick()
}
/**