feat: Edit make journal entries.

This commit is contained in:
Ahmed Bouhuolia
2020-04-08 17:50:35 +02:00
parent 8ba96e7343
commit 4920d5f419
16 changed files with 225 additions and 75 deletions

View File

@@ -64,7 +64,9 @@ export default function MoneyFieldGroup({
const options = useMemo(() => ({
prefix, suffix, thousands, decimal, precision,
}), []);
}), [
prefix, suffix, thousands, decimal, precision,
]);
const handleChange = useCallback((event) => {
const formatted = formatter(event.target.value, options);
@@ -72,12 +74,12 @@ export default function MoneyFieldGroup({
setState(formatted);
onChange && onChange(event, value);
}, []);
}, [onChange, options]);
useEffect(() => {
const formatted = formatter(value, options);
setState(formatted)
}, []);
}, [value, options, setState]);
return (
<InputGroup