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/CustomLabels.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

10 lines
537 B
Markdown

### Custom Labels
By default when the `options` array contains objects, `vue-select` looks for the `label` key for display. If your data source doesn't contain that key, you can set your own using the `label` prop.
On this page, the list of countries used in the examples contains `value` and `label` properties: `{value: "CA", label: "Canada"}`. In this example, we'll display the country code instead of the label.
`<v-select label="value" :options="countries"></v-select>`
<v-select label="value" :options="countries"></v-select>