G
G
Ghost26922019-03-07 15:38:11
Vue.js
Ghost2692, 2019-03-07 15:38:11

How to do when you select a value in the first select, the second select appears according to the fields belonging to the selected first select?

How to make a comparison with the selected select?
My example
Example:
5c81109e439fe282206498.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Drozdov, 2019-03-08
@Ghost2692

You should have several objects
1 object describes the options that are selected and you save the selected option in the data property of the selected_contact type
2 object is already dependent objects from the selected_contact option selected by keys, and you just make a connection
For example

contacts: [
   {title: 'one', value: 'one'},
   {title: 'two', value: 'two'},
],
dependence: {
  one: [
     {title: 'dep_one1', value: 'one1'},
     {title: 'dep_one2', value: 'two1'},
     ....
  ],
  two: [
     {title: 'dep_two1', value: 'two1'},
     {title: 'dep_two2', value: 'two2'},
     ....
  ]
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question