From c772e8cebe62d3d499988ea939259c9af4c8eed4 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Fri, 28 Feb 2025 21:46:14 +0200 Subject: [PATCH] fixes --- src/components/UserLookup.tsx/UserLookup.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/components/UserLookup.tsx/UserLookup.tsx b/src/components/UserLookup.tsx/UserLookup.tsx index b2c6736..300ca2f 100644 --- a/src/components/UserLookup.tsx/UserLookup.tsx +++ b/src/components/UserLookup.tsx/UserLookup.tsx @@ -102,7 +102,16 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => { }; }, [openUserLookupDrawerFunc]); - + const onClose = ()=> { + setIsOpenDrawerLookup(false) + setNameOrAddress('') + setErrorMessage('') + setPayments([]) + setIsLoadingUser(false) + setIsLoadingPayments(false) + setAddressInfo(null) + } + return ( @@ -138,7 +147,9 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => { } }} /> - + { + lookupFunc(); + }} > { marginLeft: 'auto', }} onClick={()=> { - setIsOpenDrawerLookup(false) + onClose() }}>