Removing error in Contact Filter panel.
This commit is contained in:
parent
b23518f796
commit
cc2a82e3f0
@ -44,13 +44,15 @@ const ContactFilterPanel = forwardRef(
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
resetFieldValue: (name, value) => {
|
||||
if (value !== undefined) {
|
||||
setValue(name, value);
|
||||
} else {
|
||||
reset({ ...getValues(), [name]: defaultContactFilter[name] });
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (value !== undefined) {
|
||||
setValue(name, value);
|
||||
} else {
|
||||
reset({ ...getValues(), [name]: defaultContactFilter[name] });
|
||||
}
|
||||
}, 0);
|
||||
},
|
||||
getValues, // optional: allows parent to read current form values
|
||||
getValues,
|
||||
}));
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user