chore: adds commenting to obscure form function
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import equal from 'deep-equal';
|
||||
import ObjectID from 'bson-objectid';
|
||||
import { unflatten, flatten } from 'flatley';
|
||||
import flattenFilters from './flattenFilters';
|
||||
import getSiblingData from './getSiblingData';
|
||||
|
||||
@@ -367,6 +367,10 @@ const Form: React.FC<Props> = (props) => {
|
||||
refreshCookie();
|
||||
}, 15000, [fields]);
|
||||
|
||||
// Re-run form validation every second
|
||||
// as fields change, because field validations can
|
||||
// potentially rely on OTHER field values to determine
|
||||
// if they are valid or not (siblingData, data)
|
||||
useThrottledEffect(() => {
|
||||
validateForm();
|
||||
}, 1000, [validateForm, fields]);
|
||||
|
||||
Reference in New Issue
Block a user