Skip to content

Commit

Permalink
VCST-2334: Fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Ljutyj committed Dec 6, 2024
1 parent dcfc22a commit 60c074e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,8 @@ angular.module('virtoCommerce.orderModule')
});
};

$scope.updateSelectedAll = function (selected) {
if (!selected) {
blade.selectedAll = false;
} else if (_.every(blade.currentEntity.items, item => item.selected)){
blade.selectedAll = true;
}
$scope.updateSelectedAll = function () {
blade.selectedAll = _.every(blade.currentEntity.items, item => item.selected);
};

blade.refresh();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<tr class="table-item" ng-repeat-start="data in blade.currentEntity.items" ng-class="{'__selected': $index === blade.selectedNodeId}" ng-click="openLineItemDetail(data, $index)">
<td class="table-col">
<label class="form-control __checkbox" ng-click="$event.stopPropagation()">
<input type="checkbox" ng-model="data.selected" ng-change="updateSelectedAll(data.selected)">
<input type="checkbox" ng-model="data.selected" ng-change="updateSelectedAll()">
<span class="check"></span>
</label>
</td>
Expand Down

0 comments on commit 60c074e

Please sign in to comment.