2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00
Files
vue-select/docs/md/OnChange.md
T
Jeff Sagal 201e135964 - new dedicated development template
- separate environment for developing docs
- clear out discarded couscous files
- start converting docs markdown
2017-02-01 22:32:06 -08:00

830 B

Change Event Vuex Compatibility

vue-select provides a change event. This function is passed the currently selected value(s) as it's only parameter.

This is very useful when integrating with Vuex, as it will allow your to trigger an action to update your vuex state object. Choose a callback and see it in action.

`console.log(val)`
`alert(val)`
<v-select v-on:change="consoleCallback" :options="countries"></v-select>
methods: {
  consoleCallback(val) {
    console.dir(JSON.stringify(val))
  },

  alertCallback(val) {
    alert(JSON.stringify(val))
  }
}