angular-multi-select
angular-multi-select copied to clipboard
Support for disabling whole drop-down box
It would be nice if the directive would offer the possibility to disable the whole drop-down box and not just the individual elements. This could be easily done by adjusting the template to something like this:
'<button ng-if="!isDisabled" type="button" class="button multiSelectButton" ng-click="toggleCheckboxes( $event ); refreshSelectedItems(); refreshButton();" ng-bind-html="varButtonLabel">' +
'<button ng-if="isDisabled" type="button" class="button multiSelectButton disabled" ng-bind-html="varButtonLabel">' +
Hence if the isDisabled attribute is true the drop-down itself will be disabled. IMHO this makes sense as the user doesn't have to first click to then find out that not a single item can be selected.
What do you think, can this little extension go into the code?
Hi @RealGizmo ,
The reason behind this is; I want the users to still be able to see the available selections -even when disabled- thus I don't disable the whole dropdown box.
However yeah you can easily customize that if you need it :)
Understood. What about adding another attribute "disableDropDown" for making this configurable for those customers who want it ;) ?
Great work @isteven. This directive helps solve a pretty common problem where traditional html falls short. I agree with @RealGizmo on the disable point though. Since this mimics the behavior of an html form control, it seems logical to at least include the option to disable it since all form controls support the disable attribute. I can understand your reasoning @isteven, but this behavior deviates from the normal set of html form controls and might not be what a seasoned developer using a form element would expect.
+1 for disabling the dropdown. The current disabling behavior is slightly disorienting.
:+1: for disabling the dropdown. I was looking around the documentation and couldn't find a solution to this. I would simply like to disable a button based on the response to a previous button.
+1 for disabling the dropdown.
Hi all,
Noted.. will provide this much requested feature in the next release. Cheers.
I'm just found that I need it too :+1: :)
Hi I was wondering if this feature has been implemented yet. Thanks!
+1 for disabling the dropdown.
+1 for disabling the dropdown