mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: Edit make journal entries.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user