Skip to content

Commit

Permalink
Fully move from COMPLETED -> REQUESTED
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Reynolds <[email protected]>
  • Loading branch information
gsreynolds committed Jan 3, 2024
1 parent 4f12c0e commit 618b97a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/IncidentTable/IncidentTableComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ const IncidentTableComponent = () => {
return () => {};
}, [selectedFlatRows]);

// Handle deselecting rows after incident action has completed
// Handle deselecting rows after incident action has been requested
useEffect(() => {
// TODO: Get user feedback on this workflow
// toggleAllRowsSelected only works on the currently filtered rows, therefore
Expand All @@ -447,20 +447,19 @@ const IncidentTableComponent = () => {
// Workarounds using the stateReducer to clear selectedRowIds also don't appear to work on filtered out rows
// Therefore, clearing the checkbox in the UI before it is filtered out is the best we can do for now
if (
incidentActionsStatus === 'ACTION_COMPLETED'
|| (!incidentActionsStatus.includes('TOGGLE')
&& (incidentActionsStatus.includes('REQUESTED') || incidentActionsStatus.includes('COMPLETED')))
incidentActionsStatus === 'ACTION_REQUESTED'
|| (!incidentActionsStatus.includes('TOGGLE') && (incidentActionsStatus.includes('REQUESTED')))
) {
toggleAllRowsSelected(false);
}
}, [incidentActionsStatus]);

// deselect rows after response play has completed
// deselect rows after response play has requested
// not adding this to the above useEffect because I don't want to
// take a chance of deselecting too many times
useEffect(() => {
// TODO: Get user feedback on this workflow
if (responsePlaysStatus === 'RUN_RESPONSE_PLAY_COMPLETED') {
if (responsePlaysStatus === 'RUN_RESPONSE_PLAY_REQUESTED') {
toggleAllRowsSelected(false);
}
}, [responsePlaysStatus]);
Expand Down

0 comments on commit 618b97a

Please sign in to comment.