mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
V3 - Remove mutable class properties plus other misc changes (#781)
* Remove the mutableValue prop in the Select component. * Add back mutable value when Vue Select has to manage its own value. * Remove mutableOptions, valueAsAarray. Update webpack minifer to use Terser. * Fix tabbing * Fix bug with showClearButton * Fix tests. * Call clearSelection when possible * Update dev sandbox to have all three options for setting value. * Update dev sandbox to display current value * Remove unused karma test setup. * Revert onInput name change. * Use coveralls * Change this.internalValue to this.$data._value. * Remove onInput prop and replace with internal method, updateValue. * Update tests. * Rename optionObjectComparator to optionComparator.
This commit is contained in:
+1
-16
@@ -189,21 +189,6 @@ getOptionLabel: {
|
||||
},
|
||||
```
|
||||
|
||||
## onChange
|
||||
|
||||
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 `v-model` to retrieve the selected value.
|
||||
|
||||
```js
|
||||
onChange: {
|
||||
type: Function,
|
||||
default: function(val) {
|
||||
this.$emit("input", val);
|
||||
}
|
||||
},
|
||||
```
|
||||
|
||||
## onTab
|
||||
|
||||
Select the current value if `selectOnTab` is enabled
|
||||
@@ -311,7 +296,7 @@ User defined function for adding Options
|
||||
createOption: {
|
||||
type: Function,
|
||||
default(newOption) {
|
||||
if (typeof this.mutableOptions[0] === "object") {
|
||||
if (typeof this.optionList[0] === "object") {
|
||||
newOption = { [this.label]: newOption };
|
||||
}
|
||||
this.$emit("option:created", newOption);
|
||||
|
||||
Reference in New Issue
Block a user