bootstrap-multiselect icon indicating copy to clipboard operation
bootstrap-multiselect copied to clipboard

Does widthSynchronizationMode work?

Open jweiskittel opened this issue 4 years ago • 3 comments

I've tried to use this and it never seems to change anything. I've tried all options and none of them actually do anything. Has anyone been able to get this to work? Is there something I'm missing?

jweiskittel avatar Mar 13 '21 01:03 jweiskittel

I found a workaround. Setting the class ".multiselect-container" width to 100% makes it the same width as the button, which is what I was trying to do. Still feel like the option should work for this instead of having to write additional CSS.

jweiskittel avatar Mar 13 '21 01:03 jweiskittel

widthSynchronizationMode is only applied here: https://github.com/davidstutz/bootstrap-multiselect/blob/e15132b6a3891cdb3384f1fdaea68620a2bb961b/dist/js/bootstrap-multiselect.js#L567

Setting the min-width and/or max-width probably doesn't work as intended in Bootstrap 4+. In Bootstrap 3, the dropdown button was a floated block element, whereas it's an inline-block element in Bootstrap 4 and 5. I suspect that affects how the drop-down's width is calculated.

tiesont avatar Mar 15 '21 02:03 tiesont

Thanks, @jweiskittel! That worked for me!

kjbetz avatar May 27 '21 06:05 kjbetz