Topic: Checkbox and save button in multiselect changed in 4.5.7
root-nine priority asked 6 years ago
I´ve just updated to version 4.5.7 and I noticed the following in material multi select
- The checkboxes have gone
- The "save" button to apply the selection is no longer part of the dropdown. Instead it´s visible the the dropdown is collapsed and invisible when the dropdown is expanded.
Is there a way to get back the behavior of version 4.5.6 (with checkboxes and the button inside the dropdown)?
Piotr Glejzer staff answered 6 years ago
We found a solution for that bug. We will fix it globally in next release. But if you need that for now, you have to do that steps.
- Go to your MDB PRO pack and find a material-select.js file.
- Next step you have to add new code. Find wrong code(160/171 line) and replace that code with this code:
options.append($('<li class="' + disabledClass + '"><img alt="" src="' + icon_url + '"' + classString + '/><span class="filtrable"><input class="form-check-input" type="checkbox"' + disabledClass + '/><label></label>' + option.html() + '</span></li>'));
and
options.append($('<li class="' + disabledClass + '"><span class="filtrable"><input class="form-check-input" type="checkbox"' + disabledClass + '/><label</label>' + option.html() + '</span></li>'));
- Next step you have to add function what will initiate a save button:
- Find a variable var saveSelect = $select.parent().find('button.btn-save');'
- Below that variable paste that code:
var setSaveOption = function setSaveOption() {
options.append(saveSelect);
};
And the last step:
- find code saveSelect.on('click', function () {
a below that code paste that code:
setSaveOption();
And that's it. If you have any probles and question I'm here to help you.
Best,
Piotr
Piotr Glejzer staff answered 6 years ago
root-nine priority commented 6 years ago
I´ve just sent you the order number for the MDB Pro componentPiotr Glejzer staff commented 6 years ago
Thank you again for your confirmation message. About your problem, it's a bug. We are trying to resolve that as soon as possible. Best, PiotrFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No