mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 01:58:40 -05:00
apply suggestions
This commit is contained in:
committed by
Joel Jeremy Marquez
parent
da068173e4
commit
fb9924aced
@@ -187,6 +187,10 @@ export const FocusableAmountInput = memo(function FocusableAmountInput({
|
||||
const [isNegative, setIsNegative] = useState(true);
|
||||
const [focused, setFocused] = useState(defaultFocused ?? false);
|
||||
|
||||
useEffect(() => {
|
||||
setFocused(defaultFocused ?? false);
|
||||
}, [defaultFocused]);
|
||||
|
||||
const maybeApplyNegative = (amount: number, negative: boolean) => {
|
||||
const absValue = Math.abs(amount);
|
||||
return negative ? -absValue : absValue;
|
||||
|
||||
Reference in New Issue
Block a user