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

View File

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