Input groups aka Bootstrap


#1

Hi.
I would like to append and prepend buttons to a select like Bootstrap input groups do.
As an example: https://getbootstrap.com/docs/4.0/components/input-group/#custom-select

Is this possible with select without using Bootstrap itself?


#2

Select2 has no built-in support for something like this. The “official” way to implement it would be to provide your own (SelectionAdapter](https://select2.org/advanced/default-adapters/selection). However, since there is little documentation on how to do this (other than reading through the default implementation’s source code), you could probably engineer your own solution with some JavaScript (to insert the button(s) in the Select2 container after the widget is initialized) and CSS (to make it look the way you want it).

FWIW, I don’t think you can use Bootstrap to add this functionality to Select2.