diff --git a/src/shared/ui/filter/range-amount.tsx b/src/shared/ui/filter/range-amount.tsx index 810a4ca..01338d2 100644 --- a/src/shared/ui/filter/range-amount.tsx +++ b/src/shared/ui/filter/range-amount.tsx @@ -2,7 +2,6 @@ import { FilterRangeAmountProps } from '@/entities/common/model/types'; import { useKeyboardAware } from '@/shared/lib/hooks/use-keyboard-aware'; import { useEffect } from 'react'; import { useState } from 'react'; -import { ChangeEvent } from 'react'; import { NumericFormat } from 'react-number-format'; export const FilterRangeAmount = ({ @@ -38,7 +37,11 @@ export const FilterRangeAmount = ({ value={ minAmount } allowNegative={ false } displayType="input" - onChange={(e: ChangeEvent) => onChangeMinAmount(parseInt(e.target.value)) } + thousandSeparator={true} + onValueChange={(values) => { + const { floatValue } = values; + onChangeMinAmount(floatValue); + }} onFocus={handleInputFocus} > @@ -48,7 +51,11 @@ export const FilterRangeAmount = ({ value={ maxAmount } allowNegative={ false } displayType="input" - onChange={(e: ChangeEvent) => onChangeMaxAmount(parseInt(e.target.value)) } + thousandSeparator={true} + onValueChange={(values) => { + const { floatValue } = values; + onChangeMaxAmount(floatValue); + }} onFocus={handleInputFocus} >