I have a select on my page and it has options in it.
When I initialize the select2 the options are not loaded.
<select class="form-select form-select-sm" id="select-user-1">
<option value="ze">ze</option>
<option value="za">za</option>
<option value="zo">zo</option>
<option value="zi">zi</option>
</select>
$("#select-user-id").select2();
Tried:
- Loading a diferent version of select2’s cdn
- Loading the options dynamically
New contributor
Diogo Corigo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1