feat: disable scrolling to change value for size and price fields (#1584)

This commit is contained in:
Matthew Russell 2022-10-03 01:05:26 -07:00 committed by GitHub
parent 0a5a87f432
commit 219c9e1b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,7 @@ export const DealTicketLimitAmount = ({
step={sizeStep} step={sizeStep}
min={sizeStep} min={sizeStep}
data-testid="order-size" data-testid="order-size"
onWheel={(e) => e.currentTarget.blur()}
{...register('size', { {...register('size', {
required: true, required: true,
min: sizeStep, min: sizeStep,
@ -48,6 +49,7 @@ export const DealTicketLimitAmount = ({
type="number" type="number"
step={priceStep} step={priceStep}
data-testid="order-price" data-testid="order-price"
onWheel={(e) => e.currentTarget.blur()}
{...register('price', { {...register('price', {
required: true, required: true,
min: 0, min: 0,

View File

@ -25,6 +25,7 @@ export const DealTicketMarketAmount = ({
type="number" type="number"
step={sizeStep} step={sizeStep}
min={sizeStep} min={sizeStep}
onWheel={(e) => e.currentTarget.blur()}
data-testid="order-size" data-testid="order-size"
{...register('size', { {...register('size', {
required: true, required: true,