ttskch / select2-bootstrap4-theme

Select2 v4 theme for Bootstrap4
MIT License
435 stars 205 forks source link

not support for prepend #1

Closed wnunez09 closed 5 years ago

wnunez09 commented 6 years ago

can add support for not support for prepend and Append:

select2-bootstrap4-prepend

ttskch commented 6 years ago

@wnunez09 sorry, what's select2-bootstrap4-prepend ?

808loud commented 6 years ago

I'm assuming this is referencing input groups.

miguelsmuller commented 6 years ago

It would be great

ttskch commented 6 years ago

ok, I'll try 💪

TheLoneUs commented 5 years ago

I would also like to vote for this fix. As it stands I'll need to customize this.

The offending classes in bootstrap 4 are .input-group-prepend and .input-group-append

The appended/prepended input group items are pushed off the same line by the select2 input. See: https://getbootstrap.com/docs/4.0/components/input-group/

UPDATE: The following code seems to fix the issue.

.input-group > .select2-container--bootstrap {
    display: initial;
    width: 1%;
    flex: 1 1 auto;
}
ttskch commented 5 years ago

@wnunez09 @808loud @miguelsmuller @TheLoneUs I fixed this via #14. Please check it out 😉