Answer the question
In order to leave comments, you need to log in
How in Yii2 Select2 to display predefined options in select before calling AJAX search?
Hello.
There was a question concerning Yii2 and Select2+AJAX. I looked at the documentation, I didn’t find anything similar, and I don’t really want to do crutches.
How can I substitute predefined options in the select before calling the Select2 lookup AJAX?
Suppose we display cities in the view. There are 5k+ in the database.
It is necessary to display several large cities before searching for a city and then replace them with search results if we enter letters in the field.
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