- 필터 RangeAmount 천원단위 콤마 추가
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user