Skip to content

Commit 5546936

Browse files
committed
fix(app): fix multi-location tip selection during error recovery
1 parent d0ff21c commit 5546936

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

app/src/organisms/ErrorRecoveryFlows/shared/TipSelection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export function TipSelection(props: TipSelectionProps): JSX.Element {
3737
relevantActiveNozzleLayout
3838
)}
3939
allowSelect={allowTipSelection}
40+
allowMultiDrag={false}
4041
/>
4142
)
4243
}

app/src/organisms/ErrorRecoveryFlows/shared/__tests__/TipSelection.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ describe('TipSelection', () => {
4242
channels:
4343
props.failedPipetteUtils.failedPipetteInfo?.data.channels ?? 1,
4444
allowSelect: props.allowTipSelection,
45+
allowMultiDrag: false,
4546
pipetteNozzleDetails: undefined,
4647
}),
4748
{}

app/src/organisms/WellSelection/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ interface WellSelectionProps {
2929
pipetteNozzleDetails?: NozzleLayoutDetails
3030
/* Whether highlighting and selectWells() updates are permitted. */
3131
allowSelect?: boolean
32+
/* Whether selecting multiple rows is permitted. */
33+
allowMultiDrag?: boolean
3234
}
3335

3436
export function WellSelection(props: WellSelectionProps): JSX.Element {
@@ -40,6 +42,7 @@ export function WellSelection(props: WellSelectionProps): JSX.Element {
4042
channels,
4143
pipetteNozzleDetails,
4244
allowSelect = true,
45+
allowMultiDrag = true,
4346
} = props
4447
const [highlightedWells, setHighlightedWells] = useState<WellGroup>({})
4548

@@ -61,8 +64,11 @@ export function WellSelection(props: WellSelectionProps): JSX.Element {
6164
})
6265
if (!wellSet) {
6366
return acc
67+
} else if (allowMultiDrag) {
68+
return { ...acc, [wellSet[0]]: null }
69+
} else {
70+
return { [wellSet[0]]: null }
6471
}
65-
return { ...acc, [wellSet[0]]: null }
6672
},
6773
{}
6874
)

0 commit comments

Comments
 (0)