2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

bump readme

This commit is contained in:
Jeff Sagal
2016-05-28 14:56:52 -07:00
parent 75c9032d70
commit b64969aee3
+39 -21
View File
@@ -4,16 +4,17 @@
#### Features
- No Dependencies
- **Tagging Support (+v.1.1.0)**
- No JS Dependencies
- List Filtering/Searching
- Supports Vuex
- Select Single/Multiple Options
- Bootstrap Friendly Classes
- Excellent Test Coverage
- Bootstrap Friendly Markup
- +90% Test Coverage
#### Upcoming/In Progress
- Tagging (adding options not present in list, see `taggable` branch)
- ~~Tagging (adding options not present in list, see `taggable` branch)~~ **added in v.1.1.0**
- Rich Option Templating
- Asyncronous Option Loading
@@ -50,7 +51,7 @@ export default {
```javascript
/**
* Contains the currently selected value. Very similar to a
* `value` attribute on an <input>. In most cases, you'll want
* `value` attribute on an <input>. In most cases, you'll want
* to set this as a two-way binding, using :value.sync. However,
* this will not work with Vuex, in which case you'll need to use
* the onChange callback property.
@@ -65,13 +66,23 @@ export default {
* If you are using an array of objects, vue-select will look for
* a `label` key (ex. [{label: 'This is Foo', value: 'foo'}]). A
* custom label key can be set with the `label` prop.
* @type {Array}
* @type {Object}
*/
options: {
type: Array,
default() { return [] },
},
/**
* Sets the max-height property on the dropdown list.
* @deprecated
* @type {String}
*/
maxHeight: {
type: String,
default: '400px'
},
/**
* Enable/disable filtering the options.
* @type {Boolean}
@@ -82,7 +93,7 @@ export default {
},
/**
* Equivalent to the `multiple` attribute on a `&lt;select&gt;` input.
* Equivalent to the `multiple` attribute on a `<select>` input.
* @type {Object}
*/
multiple: {
@@ -91,7 +102,7 @@ export default {
},
/**
* Equivalent to the `placeholder` attribute on an `&lt;input&gt;`.
* Equivalent to the `placeholder` attribute on an `<input>`.
* @type {Object}
*/
placeholder: {
@@ -119,9 +130,9 @@ export default {
},
/**
* Tells vue-select what key to use when generating option labels when
* `option` is an object.
* @type {Object}
* Tells vue-select what key to use when generating option
* labels when each `option` is an object.
* @type {String}
*/
label: {
type: String,
@@ -132,7 +143,8 @@ export default {
* An optional callback function that is called each time the selected
* value(s) change. When integrating with Vuex, use this callback to trigger
* an action, rather than using :value.sync to retreive the selected value.
* @type {[type]}
* @type {Function}
* @default {null}
*/
onChange: Function,
@@ -140,7 +152,17 @@ export default {
* Enable/disable creating options from searchInput.
* @type {Boolean}
*/
tagable: {
taggable: {
type: Boolean,
default: false
},
/**
* When true, newly created tags will be added to
* the options list.
* @type {Boolean}
*/
pushTags: {
type: Boolean,
default: false
},
@@ -151,15 +173,11 @@ export default {
*/
createOption: {
type: Function,
default: function (value) {
let firstOption = this.options[0]
if (firstOption && typeof firstOption === 'object' ) {
value = {
value
default: function (newOption) {
if (typeof this.options[0] === 'object') {
return {[this.label]: newOption}
}
value[this.label] = value
}
return value
return newOption
}
}
```