diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx index f22c7fb268b..ba2b7ec35a5 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx @@ -37,6 +37,7 @@ export function TipSelection(props: TipSelectionProps): JSX.Element { relevantActiveNozzleLayout )} allowSelect={allowTipSelection} + allowMultiDrag={false} /> ) } diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx index c6bee4f8d55..36f81c3ca35 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx @@ -42,6 +42,7 @@ describe('TipSelection', () => { channels: props.failedPipetteUtils.failedPipetteInfo?.data.channels ?? 1, allowSelect: props.allowTipSelection, + allowMultiDrag: false, pipetteNozzleDetails: undefined, }), {} diff --git a/app/src/organisms/WellSelection/index.tsx b/app/src/organisms/WellSelection/index.tsx index 06daf9536a5..8cebd47e03c 100644 --- a/app/src/organisms/WellSelection/index.tsx +++ b/app/src/organisms/WellSelection/index.tsx @@ -29,6 +29,8 @@ interface WellSelectionProps { pipetteNozzleDetails?: NozzleLayoutDetails /* Whether highlighting and selectWells() updates are permitted. */ allowSelect?: boolean + /* Whether selecting multiple rows is permitted. */ + allowMultiDrag?: boolean } export function WellSelection(props: WellSelectionProps): JSX.Element { @@ -40,6 +42,7 @@ export function WellSelection(props: WellSelectionProps): JSX.Element { channels, pipetteNozzleDetails, allowSelect = true, + allowMultiDrag = true, } = props const [highlightedWells, setHighlightedWells] = useState({}) @@ -61,8 +64,11 @@ export function WellSelection(props: WellSelectionProps): JSX.Element { }) if (!wellSet) { return acc + } else if (allowMultiDrag) { + return { ...acc, [wellSet[0]]: null } + } else { + return { [wellSet[0]]: null } } - return { ...acc, [wellSet[0]]: null } }, {} )