Skip to content

Commit

Permalink
Force cell to re-render after the changes state is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
qu8n authored and ao508 committed Aug 21, 2024
1 parent a9e4b79 commit 5f11a71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/components/SamplesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default function SamplesList({
setChanges(updatedChanges);
if (updatedChanges.length === 0) setUnsavedChanges?.(false);
resetAlertIfCostCentersAreAllValid(updatedChanges);
gridRef.current?.api?.refreshCells({ rowNodes: [rowNode] });
return;
}

Expand Down Expand Up @@ -229,6 +230,7 @@ export default function SamplesList({
}

setUnsavedChanges?.(true);
gridRef.current?.api?.refreshCells({ rowNodes: [rowNode] });
}

const handleDiscardChanges = () => {
Expand Down

0 comments on commit 5f11a71

Please sign in to comment.