natral
natral

Reputation: 1098

Select2 with multi select option only allows me to write 2 characters

I'm using select2 v4.0.7 and setting up a multi select with the option to dynamically create tags like so:

<select id="role-select" class="form-control" multiple="multiple">
   <option value="1">Admin</option>
</select>

and I initialize the select2 like so:

$('#role-select').select2({
    tags: true
});

All this is set up in a Laravel 5.8 environment and I'm using CDNs for select2.

The problem is that when I try to write in the select option I can't type more than 2 characters.

Is there something I'm doing wrong o not doing?

Update

Has anyone been able to reproduce this error???

Extra information: Webserver is an ubuntu 16.04 box using apache2

Upvotes: 1

Views: 1606

Answers (1)

Peter Karsai
Peter Karsai

Reputation: 99

select2 v4.0.7 and jQuery 3.4.1 are incompatible. If you use jQuery ~3.3.1 then it works.

See also https://github.com/select2/select2/issues/5485

Upvotes: 3

Related Questions