버그 픽스

This commit is contained in:
focp212@naver.com
2025-10-29 10:06:15 +09:00
parent 7a8cafe7bb
commit 92ae235b68
3 changed files with 20 additions and 13 deletions

View File

@@ -52,8 +52,8 @@ export interface FilterRangeAmountProps {
title?: string; title?: string;
minAmount?: number; minAmount?: number;
maxAmount?: number; maxAmount?: number;
setMinAmount: (minAmount: number) => void; setMinAmount: (minAmount: number | undefined) => void;
setMaxAmount: (maxAmount: number) => void; setMaxAmount: (maxAmount: number | undefined) => void;
}; };
export interface FilterButtonGroupsProps { export interface FilterButtonGroupsProps {
title: string; title: string;

View File

@@ -194,7 +194,6 @@ export const AllTransactionPartCancel = ({
<span className="value"> <span className="value">
<NumericFormat <NumericFormat
value={ totalCancelAmount } value={ totalCancelAmount }
thousandSeparator
displayType="input" displayType="input"
allowNegative={ false } allowNegative={ false }
max={ remainAmount } max={ remainAmount }

View File

@@ -2,6 +2,7 @@ import { FilterRangeAmountProps } from '@/entities/common/model/types';
import { useEffect } from 'react'; import { useEffect } from 'react';
import { useState } from 'react'; import { useState } from 'react';
import { ChangeEvent } from 'react'; import { ChangeEvent } from 'react';
import { NumericFormat } from 'react-number-format';
export const FilterRangeAmount = ({ export const FilterRangeAmount = ({
title, title,
@@ -12,6 +13,13 @@ export const FilterRangeAmount = ({
}: FilterRangeAmountProps) => { }: FilterRangeAmountProps) => {
const [filterTitle, setFilterTitle] = useState<string>(title || '거래금액'); const [filterTitle, setFilterTitle] = useState<string>(title || '거래금액');
const onChangeMinAmount = (val?: number) => {
setMinAmount(val || undefined);
};
const onChangeMaxAmount = (val?: number) => {
setMaxAmount(val || undefined);
}
useEffect(() => { useEffect(() => {
setFilterTitle(title || '거래금액'); setFilterTitle(title || '거래금액');
}, [title]) }, [title])
@@ -21,21 +29,21 @@ export const FilterRangeAmount = ({
<div className="opt-label">{ filterTitle }</div> <div className="opt-label">{ filterTitle }</div>
<div className="opt-controls"> <div className="opt-controls">
<div className="input-wrapper "> <div className="input-wrapper ">
<input <NumericFormat
type="number"
placeholder=""
value={ minAmount } value={ minAmount }
onChange={ (e: ChangeEvent<HTMLInputElement>) => setMinAmount(parseInt(e.target.value)) } allowNegative={ false }
/> displayType="input"
onChange={(e: ChangeEvent<HTMLInputElement>) => onChangeMinAmount(parseInt(e.target.value)) }
></NumericFormat>
</div> </div>
<span> ~ </span> <span> ~ </span>
<div className="input-wrapper date"> <div className="input-wrapper date">
<input <NumericFormat
type="number"
placeholder=""
value={ maxAmount } value={ maxAmount }
onChange={ (e: ChangeEvent<HTMLInputElement>) => setMaxAmount(parseInt(e.target.value)) } allowNegative={ false }
/> displayType="input"
onChange={(e: ChangeEvent<HTMLInputElement>) => onChangeMaxAmount(parseInt(e.target.value)) }
></NumericFormat>
</div> </div>
</div> </div>
</div> </div>