Answer the question
In order to leave comments, you need to log in
Why is the list not loading in select2?
Good day!
The code uses two select2s (unfortunately they were not written by me and they don’t let me rewrite the code). The first is the parent of the second. Everything is configured in such a way that if the user changes something in the first one, then the list is loaded into the second one, which depends on the selected values in the first one. Everything works well until the management needed to select the data not by hand, but by choosing a certain "preset". There were no problems with the usual (independent) selects, but with these, leapfrog began. If there was nothing on the first one and I add a value like this, $("#selectedCurrency").select2('val',[2,3,6,9])
then everything is fine, but not so much with the second one. Such actions do not lead to anything. in the second select no list came and he has nothing to choose. In this case, the change event occurs for the first one, but nothing happens with the second one.
Tell me how to solve this problem? I've been struggling with this for more than a day now.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question