Skip to content

Commit

Permalink
refactor: Use a functional updater for expanded errors state
Browse files Browse the repository at this point in the history
Co-authored-by: Bob Nisco <[email protected]>
  • Loading branch information
schottra and BobNisco authored Jul 6, 2020
1 parent a61fee2 commit 4032c0f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const WorkflowExecutionsTable: React.FC<WorkflowExecutionsTableProps> = p
const execution = executions[rowProps.index];
const cacheKey = getCacheKey(execution.id);
const onExpandCollapseError = (expanded: boolean) => {
setExpandedErrors({ ...expandedErrors, [cacheKey]: expanded });
setExpandedErrors(currentExpandedErrors => ({ ...currentExpandedErrors, [cacheKey]: expanded }));
recomputeRow(rowProps.index);
};
return (
Expand Down

0 comments on commit 4032c0f

Please sign in to comment.