-1

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-1").select2();

Tried:

  1. Loading a different version of select2's cdn
  2. 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

0