From ac4dc67b9f90e0d250b407c9466c0ca9859a2de5 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 7 Apr 2021 10:34:56 -0700 Subject: [PATCH] Repair bill edit modal not resetting. --- .../bill-detail-edit/bill-detail-edit.container.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx index 1ba6c109d..2b18e3c8b 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx @@ -117,10 +117,10 @@ export default function BillDetailEditcontainer() { }; useEffect(() => { - if (search.billid) { + if (search.billid && data) { form.resetFields(); } - }, [form, search.billid]); + }, [form, search.billid, data]); if (error) return ; if (!!!search.billid) return
{t("bills.labels.noneselected")}
; @@ -136,7 +136,7 @@ export default function BillDetailEditcontainer() { }} visible={search.billid} > - {loading && } + {loading && } {!loading && ( <>