mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
fix typo
This commit is contained in:
@@ -257,7 +257,7 @@
|
|||||||
* Enable/disable creating options from searchInput.
|
* Enable/disable creating options from searchInput.
|
||||||
* @type {Boolean}
|
* @type {Boolean}
|
||||||
*/
|
*/
|
||||||
tagable: {
|
taggable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
@@ -442,7 +442,7 @@
|
|||||||
typeAheadSelect() {
|
typeAheadSelect() {
|
||||||
if( this.filteredOptions[ this.typeAheadPointer ] ) {
|
if( this.filteredOptions[ this.typeAheadPointer ] ) {
|
||||||
this.select( this.filteredOptions[ this.typeAheadPointer ] );
|
this.select( this.filteredOptions[ this.typeAheadPointer ] );
|
||||||
} else if (this.tagable && this.search.length){
|
} else if (this.taggable && this.search.length){
|
||||||
let option = this.createOption(this.search)
|
let option = this.createOption(this.search)
|
||||||
this.isAdding = true
|
this.isAdding = true
|
||||||
this.$set('options', [option, ...this.options])
|
this.$set('options', [option, ...this.options])
|
||||||
|
|||||||
@@ -213,9 +213,9 @@ describe('Select.vue', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can adding option if tagable enabled and search is not empty', () => {
|
it('can adding option if taggable enabled and search is not empty', () => {
|
||||||
const vm = new Vue({
|
const vm = new Vue({
|
||||||
template: '<div><v-select :options="options" :value.sync="value" :multiple="true" :tagable="true"></v-select></div>',
|
template: '<div><v-select :options="options" :value.sync="value" :multiple="true" :taggable="true"></v-select></div>',
|
||||||
components: { vSelect },
|
components: { vSelect },
|
||||||
data: {
|
data: {
|
||||||
value: ['one'],
|
value: ['one'],
|
||||||
@@ -231,9 +231,9 @@ describe('Select.vue', () => {
|
|||||||
expect(vm.$children[0].options[0]).toEqual('four')
|
expect(vm.$children[0].options[0]).toEqual('four')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should select added option if tagable enabled and search is not empty', (done) => {
|
it('should select added option if taggable enabled and search is not empty', (done) => {
|
||||||
const vm = new Vue({
|
const vm = new Vue({
|
||||||
template: '<div><v-select :options="options" :value.sync="value" :multiple="true" :tagable="true"></v-select></div>',
|
template: '<div><v-select :options="options" :value.sync="value" :multiple="true" :taggable="true"></v-select></div>',
|
||||||
components: { vSelect },
|
components: { vSelect },
|
||||||
data: {
|
data: {
|
||||||
value: ['one'],
|
value: ['one'],
|
||||||
@@ -252,6 +252,5 @@ describe('Select.vue', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// also see example testing a component with mocks at
|
// also see example testing a component with mocks at
|
||||||
// https://github.com/vuejs/vueify-example/blob/master/test/unit/a.spec.js#L22-L43
|
// https://github.com/vuejs/vueify-example/blob/master/test/unit/a.spec.js#L22-L43
|
||||||
|
|||||||
Reference in New Issue
Block a user