Skip to content

Commit

Permalink
fix(app): Don't initialize the keyboard with an invalid value when cr…
Browse files Browse the repository at this point in the history
…eating Quick Transfer protocols. (#16203)
  • Loading branch information
vegano1 authored Sep 6, 2024
1 parent 02ba906 commit b462aaf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export function AirGap(props: AirGapProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(volume)}
initialValue={String(volume ?? '')}
onChange={e => {
setVolume(Number(e))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export function Delay(props: DelayProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(delayDuration ?? '')}
onChange={e => {
setDelayDuration(Number(e))
}}
Expand Down Expand Up @@ -277,7 +278,7 @@ export function Delay(props: DelayProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(position)}
initialValue={String(position ?? '')}
onChange={e => {
setPosition(Number(e))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function FlowRateEntry(props: FlowRateEntryProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(flowRate)}
initialValue={String(flowRate ?? '')}
onChange={e => {
setFlowRate(Number(e))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export function Mix(props: MixProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(mixVolume)}
initialValue={String(mixVolume ?? '')}
onChange={e => {
setMixVolume(Number(e))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export function PipettePath(props: PipettePathProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(disposalVolume)}
initialValue={String(disposalVolume ?? '')}
onChange={e => {
setDisposalVolume(Number(e))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function TipPositionEntry(props: TipPositionEntryProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(tipPosition)}
initialValue={String(tipPosition ?? '')}
onChange={e => {
setTipPosition(Number(e))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export function TouchTip(props: TouchTipProps): JSX.Element {
>
<NumericalKeyboard
keyboardRef={keyboardRef}
initialValue={String(position)}
initialValue={String(position ?? '')}
onChange={e => {
setPosition(Number(e))
}}
Expand Down

0 comments on commit b462aaf

Please sign in to comment.