diff --git a/components/lib/inputnumber/InputNumber.js b/components/lib/inputnumber/InputNumber.js index 175bedb35a..d59f22acc4 100644 --- a/components/lib/inputnumber/InputNumber.js +++ b/components/lib/inputnumber/InputNumber.js @@ -1,7 +1,7 @@ import * as React from 'react'; import PrimeReact, { PrimeReactContext } from '../api/Api'; import { useHandleStyle } from '../componentbase/ComponentBase'; -import { useMergeProps, useMountEffect, useUpdateEffect } from '../hooks/Hooks'; +import { useMergeProps, useMountEffect, useUnmountEffect, useUpdateEffect } from '../hooks/Hooks'; import { AngleDownIcon } from '../icons/angledown'; import { AngleUpIcon } from '../icons/angleup'; import { InputText } from '../inputtext/InputText'; @@ -1135,6 +1135,10 @@ export const InputNumber = React.memo( ObjectUtils.combinedRefs(inputRef, props.inputRef); }, [inputRef, props.inputRef]); + useUnmountEffect(() => { + clearTimer(); + }); + useMountEffect(() => { constructParser();