fix(paymentmade): fix cancel and clear button.

This commit is contained in:
elforjani3
2021-03-07 21:14:07 +02:00
parent b6ffd492fa
commit e551a89c7b

View File

@@ -26,7 +26,7 @@ export default function PaymentReceiveFormFloatingActions() {
const { setSubmitPayload, isNewMode } = usePaymentReceiveFormContext();
// Formik form context.
const { isSubmitting, submitForm } = useFormikContext();
const { isSubmitting, submitForm, resetForm } = useFormikContext();
// History context.
const history = useHistory();
@@ -38,7 +38,9 @@ export default function PaymentReceiveFormFloatingActions() {
};
// Handle clear button click.
const handleClearBtnClick = (event) => {};
const handleClearBtnClick = (event) => {
resetForm();
};
// Handle cancel button click.
const handleCancelBtnClick = (event) => {