Nested Select, fails to set the second setValue after sending request based on the data of the first select #252
Replies: 2 comments
-
Can you give a step-by-step of what you expect to happen? |
Beta Was this translation helpful? Give feedback.
-
In relation to what I say, I have 3 web services. The first to edit the form I have a modal to add state, in which I depend on the selected country, wanting to edit the record that returns the values to fill in the entire form, but filling in the nested selection I only manage to establish the value of the first selection that is country, because the state depends on the country, so I need to make a query after setting the value of the selected country and with this I manage to load the state, but I can't set the value, how can I load the state and wait until I have a successful response and manage to set the value that comes from editing?, so in the example is the proof of how, you do NOT get to set the second value of the second select PS: I have used the sync() method of the plugin you share with us, but you can't wait for the status select to be full to set the value In the javascript section I leave comments step by step the example is about post, but it has the same idea that I try to raise (https://jsfiddle.net/satdae/rhaLtus2/16/) Thank you for such an excellent plugin. |
Beta Was this translation helpful? Give feedback.
-
Due to the change of setting javascript vanilla and leaving JQuery aside, I have chosen to use the tom select plugin, which when trying to edit records by clicking on the EDIT option, I retrieve the values of a web service which returns me a piece of information to set the number one select, the second select is queried based on the first selected select, and when setting the time in which the response returns it does not allow setting the value in the next step... https://jsfiddle.net/satdae/rhaLtus2/12/
I added to have a clearer idea, also I leave the repository where the example is, I hope you can support me.
Beta Was this translation helpful? Give feedback.
All reactions