2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-01 05:54:03 +03:00

fix typeahead select

This commit is contained in:
Jeff Sagal
2016-03-01 22:06:02 -08:00
parent 08b8e21ad9
commit f7b4e6e4f4
4 changed files with 33 additions and 12 deletions
+23 -3
View File
@@ -2,14 +2,33 @@
<div id="app" class="container">
<h1>Vue Select</h1>
<p class="lead">A simple component that provides similar functionality to Select2 without the overhead of jQuery.</p>
<div class="row">
<div class="col-md-6">
<v-select placeholder="choose something" :value.sync="select" :options="options" :multiple="true"></v-select>
<h3>Options</h3>
<div class="checkbox">
<label>
<input v-model="multiple" type="checkbox"> Allow Multiple
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<v-select
placeholder="choose something"
:value.sync="select"
:options="options"
:multiple="multiple">
</v-select>
</div>
<pre class="col-md-6">{{ select | json }}</pre>
<div class="col-md-6">
<pre><strong>Selected:</strong>{{ select | json }}</pre>
</div>
</div>
</div>
</template>
@@ -23,6 +42,7 @@ export default {
data() {
return {
select: [],
multiple: true,
options: require('./countries.js')
}
}
+2 -3
View File
@@ -153,7 +153,7 @@
},
searchable: {
type: Boolean,
default: true
default: false
},
multiple: {
type: Boolean,
@@ -246,8 +246,7 @@
},
typeAheadSelect() {
var option = this.filteredOptions[ this.typeAheadPointer ];
this.select( this.getOptionValue(option) );
this.select( this.filteredOptions[ this.typeAheadPointer ] );
this.search = "";
},