mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
BIG-22: feat: localize auto-increment dialogs.
This commit is contained in:
14
client/src/components/Forms/FormObserver.js
Normal file
14
client/src/components/Forms/FormObserver.js
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export function FormObserver({ onChange, values }) {
|
||||
useEffect(() => {
|
||||
onChange(values);
|
||||
}, [Object.values(values).join(', ')]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
FormObserver.defaultProps = {
|
||||
onChange: () => null,
|
||||
};
|
||||
1
client/src/components/Forms/index.js
Normal file
1
client/src/components/Forms/index.js
Normal file
@@ -0,0 +1 @@
|
||||
export * from './FormObserver';
|
||||
@@ -76,6 +76,7 @@ export * from './Alert';
|
||||
export * from './Subscriptions';
|
||||
export * from './Dashboard';
|
||||
export * from './Drawer';
|
||||
export * from './Forms';
|
||||
|
||||
const Hint = FieldHint;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user