2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-16 09:10:33 +03:00
Files
vue-select/docs/.vitepress/components/OpenWhenSearchTextPresent.vue
T
Jeff Sagal 96ff08406c vitepress wip
mostly working, feeling like vuepress should still be considered
2022-02-23 10:25:36 -08:00

30 lines
488 B
Vue

<template>
<v-select
v-model="country"
:options="countries"
:dropdown-should-open="dropdownShouldOpen"
/>
</template>
<script>
import countries from '../data/countries.js'
export default {
data() {
return {
countries,
country: null,
}
},
methods: {
dropdownShouldOpen(VueSelect) {
if (this.country !== null) {
return VueSelect.open
}
return VueSelect.search.length !== 0 && VueSelect.open
},
},
}
</script>