Skip to content

Commit

Permalink
HARMONY-398: Ensure select all box state is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyinverso committed Oct 11, 2023
1 parent 81ce49b commit ebc2f4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/js/workflow-ui/jobs/jobs-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ function initSelectHandler(selector) {
jobIDs.splice(jobIDs.indexOf(jobID), 1);
statuses.splice(statuses.indexOf(status), 1);
}
const numSelectable = document.querySelectorAll('.select-job').length;
const numSelected = jobIDs.length;
const areAllJobsSelected = numSelectable === numSelected;
document.getElementById('select-jobs').checked = areAllJobsSelected;
PubSub.publish('job-selected');
});
});
Expand Down

0 comments on commit ebc2f4f

Please sign in to comment.