feathers-vuex-select

0.1.1 • Public • Published

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 (------------------------------)

Package Sidebar

Install

npm i feathers-vuex-select

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

4.39 kB

Total Files

5

Last publish

Collaborators

  • nicoriesco