refactor: using isDirty in forms
This commit is contained in:
@ -29,7 +29,7 @@ const GeneralTab: FC<Props> = ({ value, onDelete, onChange }) => {
|
||||
});
|
||||
|
||||
const onSubmit = (values: DealForm) => {
|
||||
form.setInitialValues(values);
|
||||
form.resetDirty();
|
||||
onChange({
|
||||
...values,
|
||||
board: values.board!,
|
||||
@ -63,7 +63,6 @@ const GeneralTab: FC<Props> = ({ value, onDelete, onChange }) => {
|
||||
/>
|
||||
<Footer
|
||||
form={form}
|
||||
initialValues={value}
|
||||
onDelete={() => onDelete(value)}
|
||||
/>
|
||||
</Stack>
|
||||
|
||||
Reference in New Issue
Block a user