- 필터 RangeAmount 천원단위 콤마 추가

This commit is contained in:
HyeonJongKim
2025-11-21 17:50:27 +09:00
parent 487bf2b3f1
commit 51179b3e22

View File

@@ -2,7 +2,6 @@ import { FilterRangeAmountProps } from '@/entities/common/model/types';
import { useKeyboardAware } from '@/shared/lib/hooks/use-keyboard-aware'; import { useKeyboardAware } from '@/shared/lib/hooks/use-keyboard-aware';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { useState } from 'react'; import { useState } from 'react';
import { ChangeEvent } from 'react';
import { NumericFormat } from 'react-number-format'; import { NumericFormat } from 'react-number-format';
export const FilterRangeAmount = ({ export const FilterRangeAmount = ({
@@ -38,7 +37,11 @@ export const FilterRangeAmount = ({
value={ minAmount } value={ minAmount }
allowNegative={ false } allowNegative={ false }
displayType="input" displayType="input"
onChange={(e: ChangeEvent<HTMLInputElement>) => onChangeMinAmount(parseInt(e.target.value)) } thousandSeparator={true}
onValueChange={(values) => {
const { floatValue } = values;
onChangeMinAmount(floatValue);
}}
onFocus={handleInputFocus} onFocus={handleInputFocus}
></NumericFormat> ></NumericFormat>
</div> </div>
@@ -48,7 +51,11 @@ export const FilterRangeAmount = ({
value={ maxAmount } value={ maxAmount }
allowNegative={ false } allowNegative={ false }
displayType="input" displayType="input"
onChange={(e: ChangeEvent<HTMLInputElement>) => onChangeMaxAmount(parseInt(e.target.value)) } thousandSeparator={true}
onValueChange={(values) => {
const { floatValue } = values;
onChangeMaxAmount(floatValue);
}}
onFocus={handleInputFocus} onFocus={handleInputFocus}
></NumericFormat> ></NumericFormat>
</div> </div>