multi-select icon indicating copy to clipboard operation
multi-select copied to clipboard

deselect all removes pre-selected disabled items

Open SA751F opened this issue 9 years ago • 2 comments

I see that plugin supports having pre-selected disabled options, so that they cannot be removed. It works fine otherwise, But deselect_all doesnt take those into account.

SA751F avatar Dec 06 '16 18:12 SA751F

have the same problem, when calling deselect_all also the disabled options in the "right" list are moved to the "left" one, while remain disabled. When calling select_all after that, this elements remain in the left list. Is there a solution for that case, since the post is more than 3 years old??

BoboMcKane avatar Jul 08 '19 09:07 BoboMcKane

Same here. Ended up doing something like this

$('#js-selection').multiSelect('deselect_all');
$('#disabledOption').removeAttr('disabled');
$('#js-selection').multiSelect('refresh');
$('#js-selection').multiSelect('select', $('#disabledOption').val());
$('#disabledOption').attr('disabled', true);
$('#js-selection').multiSelect('refresh');

Not pretty but it's working...

konpa avatar Jun 25 '20 07:06 konpa