fix: #2494, reduces versions caused by reverting to published with autosave: true

This commit is contained in:
James
2023-04-17 20:23:56 -04:00
parent 506bf646ba
commit e0c0b2fdf6

View File

@@ -334,6 +334,7 @@ const Form: React.FC<Props> = (props) => {
const reset = useCallback(async (fieldSchema: Field[], data: unknown) => {
const state = await buildStateFromSchema({ fieldSchema, data, user, id, operation, locale, t });
contextRef.current = { ...initContextState } as FormContextType;
setModified(false);
dispatchFields({ type: 'REPLACE_STATE', state });
}, [id, user, operation, locale, t, dispatchFields]);