Skip to content

Commit

Permalink
fix(app): fix multi-location tip selection during error recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Feb 6, 2025
1 parent d0ff21c commit 5546936
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export function TipSelection(props: TipSelectionProps): JSX.Element {
relevantActiveNozzleLayout
)}
allowSelect={allowTipSelection}
allowMultiDrag={false}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('TipSelection', () => {
channels:
props.failedPipetteUtils.failedPipetteInfo?.data.channels ?? 1,
allowSelect: props.allowTipSelection,
allowMultiDrag: false,
pipetteNozzleDetails: undefined,
}),
{}
Expand Down
8 changes: 7 additions & 1 deletion app/src/organisms/WellSelection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -40,6 +42,7 @@ export function WellSelection(props: WellSelectionProps): JSX.Element {
channels,
pipetteNozzleDetails,
allowSelect = true,
allowMultiDrag = true,
} = props
const [highlightedWells, setHighlightedWells] = useState<WellGroup>({})

Expand All @@ -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 }
},
{}
)
Expand Down

0 comments on commit 5546936

Please sign in to comment.