Skip to content
This repository was archived by the owner on Dec 16, 2019. It is now read-only.
This repository was archived by the owner on Dec 16, 2019. It is now read-only.

onDeselectAll is not working as expected #446

Open
@NarasinghaP

Description

@NarasinghaP

Hello @pkempenaers
If I am calling a function on Uncheck all, the same function also gets called when Check All is clicked.
my HTML Code
<div ng-dropdown-multiselect="" options="facilities" selected-model="invoice.facilities" extra-settings="multidropdownSettings" form-name="step_one_form" translation-texts="translationText" events="customEvents"></div>
My javaScript Code
$scope.customEvents = { onSelectAll: function () { console.log('checked') }, onUnselectAll: function () { console.log('unchecked') } };
When Uncheck is clicked, in console, only unchecked is printing. But if Check All is clicked, both checked and unchecked are printed.
My question is how to call a function only when Uncheck All is clicked? I even saw this . It did not help.

In addition to that the in angularjs-dropdown-multiselect.js the function selectAll contains following code.
$scope.selectAll = function () { $scope.deselectAll(false); $scope.externalEvents.onSelectAll(); angular.forEach($scope.options, function (value) { $scope.setSelectedItem(value[$scope.settings.idProp], true); }); };
If i remove/comment $scope.deselectAll(false);, it works as expected.
Please do help me with this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions