diff --git a/dist/js/bootstrap-multiselect.js b/dist/js/bootstrap-multiselect.js index 2a028b77..81459b5c 100644 --- a/dist/js/bootstrap-multiselect.js +++ b/dist/js/bootstrap-multiselect.js @@ -403,6 +403,7 @@ buttonClass: 'btn btn-default', inheritClass: false, buttonWidth: 'auto', + buttonMaxWidth: 'auto', buttonContainer: '
', dropRight: false, dropUp: false, @@ -489,6 +490,17 @@ this.$container.css({ 'width': this.options.buttonWidth }); + } else + // Manually add button max-width if set. + if (this.options.buttonMaxWidth && this.options.buttonMaxWidth !== 'auto') { + this.$button.css({ + 'max-width' : this.options.buttonMaxWidth, + 'overflow' : 'hidden', + 'text-overflow' : 'ellipsis' + }); + this.$container.css({ + 'max-width': this.options.buttonMaxWidth + }); } // Keep the tab index from the select.