2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

- better background color for 'active' dropdown option

- simplify conditional logic in select()
	- less nested conditionals
	- tagging logic moved to createOption method
	- add option:created event
	- pull up push tags logic to it's own method
- improve isOptionSelected so that functionality is exactly the same as v1
	- hitting enter on an already added tag will remove it from the value instead of doing nothing
This commit is contained in:
Jeff Sagal
2017-02-02 16:40:11 -08:00
parent 201e135964
commit cbeffafb17
2 changed files with 638 additions and 619 deletions
+635 -617
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -813,6 +813,7 @@ describe('Select.vue', () => {
})
})
})
it('should not reset the selected value when the options property changes', (done) => {
const vm = new Vue({
template: '<div><v-select :options="options" :value="value" :multiple="true" taggable></v-select></div>',
@@ -841,7 +842,7 @@ describe('Select.vue', () => {
vm.$refs.select.search = 'one'
searchSubmit(vm)
Vue.nextTick(() => {
expect(vm.$refs.select.mutableValue).toEqual(['one'])
expect(vm.$refs.select.mutableValue).toEqual([])
expect(vm.$refs.select.search).toEqual('')
done()
})
@@ -860,7 +861,7 @@ describe('Select.vue', () => {
vm.$refs.select.search = 'one'
searchSubmit(vm)
Vue.nextTick(() => {
expect(vm.$refs.select.mutableValue).toEqual(['one'])
expect(vm.$refs.select.mutableValue).toEqual([])
expect(vm.$refs.select.search).toEqual('')
done()
})