Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centralize select options #36

Open
omiras opened this issue Feb 23, 2021 · 0 comments
Open

Centralize select options #36

omiras opened this issue Feb 23, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@omiras
Copy link
Contributor

omiras commented Feb 23, 2021

We need to manage the values and labels for all the components of our app.

  1. Create a new file in /src/utils/labels.js
  2. Create an array-object structure to store all the values and labels for each select option
const species = [
   { value: 0, label: 'Gato'},
   { value:1, label 'Perro'}
]

const provinces = [
   { value: 1, label: 'Alava''}
]

  1. Then, in the component, you should retrieve this information to create as many ion-select-options as needed (v-for)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants