From e551a89c7b91d55da008e9aee583a027e47ab51e Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Sun, 7 Mar 2021 21:14:07 +0200 Subject: [PATCH] fix(paymentmade): fix cancel and clear button. --- .../PaymentReceiveForm/PaymentReceiveFloatingActions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveFloatingActions.js b/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveFloatingActions.js index 6cc28a56b..bc71e8d9e 100644 --- a/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveFloatingActions.js +++ b/client/src/containers/Sales/PaymentReceives/PaymentReceiveForm/PaymentReceiveFloatingActions.js @@ -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) => {