Select2 V4 - Lock some selected values

34 Views Asked by At

I'm trying to prevent some selected values from being removable when making multiple selections with Select2, they should not have an X symbol on them.

There is a locked feature in the old version of Select2, but I could not find anything similar in v4.

<select class="form-control" name="Select2" id="Select2" multiple="multiple">
    <option disabled value="">-</option>
    <option locked="true" selected value="Locked">Locked Option</option>
    <option value="another">Another Option</option>
</select>
0

There are 0 best solutions below