From 6140ead3f2a7d01e81fe8f27e719532eb7b04975 Mon Sep 17 00:00:00 2001 From: ncdiehl11 Date: Thu, 14 Nov 2024 18:07:27 -0500 Subject: [PATCH] deselect all wells when confirming form --- .../src/components/labware/SelectableLabware.tsx | 1 + .../src/organisms/AssignLiquidsModal/LiquidToolbox.tsx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/protocol-designer/src/components/labware/SelectableLabware.tsx b/protocol-designer/src/components/labware/SelectableLabware.tsx index f9177bb5bfd..0e1e2b1c156 100644 --- a/protocol-designer/src/components/labware/SelectableLabware.tsx +++ b/protocol-designer/src/components/labware/SelectableLabware.tsx @@ -131,6 +131,7 @@ export const SelectableLabware = (props: Props): JSX.Element => { rect ) => { const wells = _wellsFromSelected(_getWellsFromRect(rect)) + console.log(wells) const areWellsAlreadySelected = Object.keys(wells).every( well => well in selectedPrimaryWells ) diff --git a/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx b/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx index 64bfdfc15dd..65c3243590d 100644 --- a/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx +++ b/protocol-designer/src/organisms/AssignLiquidsModal/LiquidToolbox.tsx @@ -234,7 +234,10 @@ export function LiquidToolbox(props: LiquidToolboxProps): JSX.Element { } confirmButtonText={t('shared:done')} - onConfirmClick={onClose} + onConfirmClick={() => { + dispatch(deselectAllWells()) + onClose() + }} onCloseClick={handleClearSelectedWells} height="calc(100vh - 64px)" closeButton={