mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-19 09:50:33 +03:00
Only emit input on actual input events
Seperated it from the change event, which will still occur upon any change of value (programmatic, user, whathaveyou)
This commit is contained in:
@@ -566,7 +566,14 @@
|
|||||||
onChange: {
|
onChange: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: function (val) {
|
default: function (val) {
|
||||||
this.$emit('input', val)
|
this.$emit('change', val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onInput: {
|
||||||
|
type: Function,
|
||||||
|
default: function (val) {
|
||||||
|
this.$emit('input', val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -830,6 +837,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.mutableValue = option
|
this.mutableValue = option
|
||||||
}
|
}
|
||||||
|
this.onInput(this.mutableValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.onAfterSelect(option)
|
this.onAfterSelect(option)
|
||||||
@@ -853,6 +861,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.mutableValue = null
|
this.mutableValue = null
|
||||||
}
|
}
|
||||||
|
this.onInput(this.mutableValue);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -861,6 +870,7 @@
|
|||||||
*/
|
*/
|
||||||
clearSelection() {
|
clearSelection() {
|
||||||
this.mutableValue = this.multiple ? [] : null
|
this.mutableValue = this.multiple ? [] : null
|
||||||
|
this.onInput(this.mutableValue)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user