Skip to content

Commit

Permalink
ON-33356 # add commentary for handleWheel
Browse files Browse the repository at this point in the history
  • Loading branch information
divporter committed Jul 23, 2023
1 parent 3a2ac48 commit 6150583
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/form-elements/FormElementNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function FormElementNumber({
)
const htmlInputElementRef = React.useRef<HTMLInputElement>(null)

//this onWheel callback prevents numbers changing while scrolling
const handleWheel = React.useCallback(() => {
htmlInputElementRef.current?.blur()
setTimeout(() => {
Expand Down

0 comments on commit 6150583

Please sign in to comment.