Skip to content

Commit

Permalink
Merge pull request #835 from illacloud/fix/number-input-bug
Browse files Browse the repository at this point in the history
fix: number input ref bug
  • Loading branch information
Wangtaofeng authored Dec 20, 2023
2 parents 08d7537 + cc87319 commit 642f224
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions packages/input-number/src/input-number.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
forwardRef,
MutableRefObject,
useCallback,
useImperativeHandle,
useRef,
} from "react"
import { forwardRef, MutableRefObject, useCallback, useRef } from "react"
import { InputNumberProps } from "./interface"
import { Input } from "@illa-design/input"
import { DownIcon, MinusIcon, PlusIcon, UpIcon } from "@illa-design/icon"
Expand Down Expand Up @@ -54,13 +48,6 @@ export const InputNumber = forwardRef<HTMLInputElement, InputNumberProps>(
const currentInputRef =
useRef<HTMLInputElement>() as MutableRefObject<HTMLInputElement>

// useImperativeHandle(inputRef, () => ({
// ...currentInputRef.current,
// focus: () => {
// currentInputRef.current.focus()
// },
// }))

const plusStep = useCallback((): void => {
const currentNumber = Number(finalValue)

Expand Down

0 comments on commit 642f224

Please sign in to comment.