Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It doesnt work with Bootstrap 5 #1226

Closed
htdung83 opened this issue Feb 9, 2022 · 8 comments
Closed

It doesnt work with Bootstrap 5 #1226

htdung83 opened this issue Feb 9, 2022 · 8 comments

Comments

@htdung83
Copy link

htdung83 commented Feb 9, 2022

I am using Bootstrap 5.1.3 and try to install this plugin but it seems not to work with Bootstrap 5. The screen showed none selected unstyled button only. The list, even, doesn't show on clicking event.
unstyled-button
.

@tiesont
Copy link
Collaborator

tiesont commented Feb 18, 2022

Correct - Bootstrap 5 is not currently supported. You can use this library with Bootstrap 3 or Bootstrap 4.

@jalley64
Copy link

Any plans on supporting 5?

@PawelPatyk
Copy link

It should help:

$('#custom-select').multiselect({
    templates: {
        button: '<button type="button" class="multiselect dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><span class="multiselect-selected-text"></span></button>'
    },
});

@htdung83
Copy link
Author

htdung83 commented Mar 4, 2022

It should help:

$('#custom-select').multiselect({
    templates: {
        button: '<button type="button" class="multiselect dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><span class="multiselect-selected-text"></span></button>'
    },
});

It should help:

$('#custom-select').multiselect({
    templates: {
        button: '<button type="button" class="multiselect dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><span class="multiselect-selected-text"></span></button>'
    },
});

Thankss a lot

@gh-at-sqh
Copy link

$.fn.multiselect.Constructor.prototype.defaults.templates.button = '<button type="button" class="multiselect dropdown-toggle form-control" data-bs-toggle="dropdown"><span class="multiselect-selected-text"></span></button>'

@NorbertHanni
Copy link

text-left --> text-start and text-right --> text.end
$.fn.multiselect.Constructor.prototype.defaults.buildButton
if (this.options.buttonTextAlignment) {
switch (this.options.buttonTextAlignment) {
case 'left':
this.$button.addClass('text-start');
break;
case 'center':
this.$button.addClass('text-center');
break;
case 'right':
this.$button.addClass('text-end');
break;
}
}

@davidstutz
Copy link
Owner

Closing with reference to #1189.

@markusd1984
Copy link

markusd1984 commented Nov 15, 2022

Correct - Bootstrap 5 is not currently supported. You can use this library with Bootstrap 3 or Bootstrap 4.

Thanks, that explains why I didn't get any dropdown, was hard to figure out with the lack of mention in the guide and no errors in the console, this should be mentioned in the guide and ideally an error in the console. =)

Also popper.js is required for dropdowns, neither any mentions in getting started as far I saw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants