rkj
rkj

Reputation: 541

Make a scrollabe input type text of select2

I'm using select2 in place of search box.

Here i'm using to load countries values like this

 <label class="description"> Countries </label>
<input type="text" placeholder="Enter Comma Separated Countries..." class="save_check" 
    style="overflow: auto; width: 208px; margin: 5px 0px 5px; border-style: solid;" id="countries" />

What happens here is whenever i select values in this, the height of this input type text goes on increasing which goes beyond its parent div height, I wan't it to be scrollable as the parameters increases. In select2.css i changed overflow: auto but none works.

Upvotes: 2

Views: 3520

Answers (1)

anpsmn
anpsmn

Reputation: 7257

Set the height to the element for the overflow: auto to work.

.select2-container-multi .select2-choices {
 height: 70px; 
 overflow: auto;
}

Upvotes: 4

Related Questions