2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-16 09:10:33 +03:00

Merge branch 'kball-add-select-on-tab-option'

# Conflicts:
#	src/components/Select.vue
This commit is contained in:
Jeff
2018-08-07 21:16:44 -07:00
3 changed files with 39 additions and 2 deletions
+16
View File
@@ -109,6 +109,22 @@ describe('Select.vue', () => {
expect(vm.$children[0].mutableValue).toEqual(vm.value)
})
it('can select an option on tab', (done) => {
const vm = new Vue({
template: `<div><v-select :options="['one','two']" select-on-tab></v-select></div>`,
components: {vSelect},
}).$mount()
vm.$children[0].typeAheadPointer = 0
trigger(vm.$children[0].$refs.search, 'keydown', (e) => e.keyCode = 9)
Vue.nextTick(() => {
expect(vm.$children[0].mutableValue).toEqual('one');
done();
})
})
it('can deselect a pre-selected object', () => {
const vm = new Vue({
template: '<div><v-select :options="options" :value="value" :multiple="true"></v-select></div>',