mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
refactor: use an immediate watcher instead of created hook for reduce (#1523)
This commit is contained in:
@@ -932,10 +932,13 @@ export default {
|
||||
* Make sure to update internal
|
||||
* value if prop changes outside
|
||||
*/
|
||||
value(val) {
|
||||
if (this.isTrackingValues) {
|
||||
this.setInternalValueFromOptions(val)
|
||||
}
|
||||
value: {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
if (this.isTrackingValues) {
|
||||
this.setInternalValueFromOptions(val)
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -955,10 +958,6 @@ export default {
|
||||
created() {
|
||||
this.mutableLoading = this.loading
|
||||
|
||||
if (typeof this.value !== 'undefined' && this.isTrackingValues) {
|
||||
this.setInternalValueFromOptions(this.value)
|
||||
}
|
||||
|
||||
this.$on('option:created', this.pushTag)
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user