2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-20 03:09:36 +03:00
Files
vue-select/docs/VModel.md
T
2017-09-03 11:26:03 -07:00

957 B

Two-Way Value Syncing

The most common use case for vue-select is being able to sync the components value with a parent component. The value property supports two-way data binding to accomplish this. The .sync data-binding modifier is completely optional. You may use value without a two-way binding to preselect options. Here we have preselected 'Canada' by setting syncedVal: 'Canada' on the parent component. The buttons below demonstrate how you can set the value from the parent. Current value: {{ syncedVal }}

``
Set to United States Set to Canada