angularjs-dropdown-multiselect
angularjs-dropdown-multiselect copied to clipboard
Is possible always checked one item in the list?
Hi,
I'm working in the case, always keep at least one item checked in the list. So, I just did an workaround, I'm checking of selected-model in the events onItemDeselect, if the it deselected the last item in the list, i push it back in the selected-model. It works fine, but the UX is not good, it make some confuse for user when he uncheck that item on the UI, but it still there, after that he toggle the dropdown and it get back.
Is there any way to prevent user uncheck the last item before event onItemDeselect fire a trigger? Thanks
any ideas?
Suggestion: When the user tries to de/select the last selected option, the drop-down should somehow automatically close and there should be some sort of toast/pop-up/alert saying "At least One Item Needs to be Check "