feathers-vuex-select
v0.1.1
Published
Select component using feathers vuex services
Downloads
7
Maintainers
Readme
Feathers Vuex Select
Select component using feathers vuex services
References
Example
Import and register in your VM:
import FeathersVuexSelect from 'feathers-vuex-select'
...
export default {
...
components: {
FeathersVuexSelect
},
...
}
Use it in your template
<FeathersVuexSelect
v-model="address.countryId"
optionsValue="_id"
optionsText="name"
serviceName="country"
:query="{ name: 'USA' }"
optionsCaption="Select one country from the list"
optionsSeparator=""
/>
Params / properties
- v-model: wherever you want to store the selected option (
value/id
) - optionsValue: property that defines the
id
- optionsText: property that defines the text to show in the pull down (human readable)
- serviceName: name of the service, i.e.
/my-service
- :query: an object with the query to get data from the service
- optionsCaption: if this is set (other than
""
) it will appear as a first option - optionsCaption: if this is set (other than
""
) it will show a line before the available options (------------------------------
)