Skip to content

Commit

Permalink
debit/credit에서 휠 돌려도 숫자 안바뀌도록
Browse files Browse the repository at this point in the history
  • Loading branch information
if1live committed Aug 6, 2024
1 parent eeac3c0 commit 04e8e84
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
Input,
InputWrapper,
NativeSelect,
NumberInput,
Table,
} from "@mantine/core";
import { JournalEntry, type Preset } from "@yuuka/api";
Expand Down Expand Up @@ -217,12 +218,12 @@ export const JournalEntryForm = (props: {
</Input.Wrapper>

<Input.Wrapper label="debit">
<Input
type="number"
{...register(`lines_debit.${idx}.debit`, {
<NumberInput
{...(register(`lines_debit.${idx}.debit`, {
valueAsNumber: true,
min: 0,
})}
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
}) as any)}
/>
</Input.Wrapper>

Expand Down Expand Up @@ -265,12 +266,12 @@ export const JournalEntryForm = (props: {
</NativeSelect>
</InputWrapper>
<InputWrapper label="credit">
<Input
type="number"
{...register(`lines_credit.${idx}.credit`, {
<NumberInput
{...(register(`lines_credit.${idx}.credit`, {
valueAsNumber: true,
min: 0,
})}
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
}) as any)}
/>
</InputWrapper>
<InputWrapper label="commodity">
Expand Down

0 comments on commit 04e8e84

Please sign in to comment.