From 73379f5b87ba8a3a0ba4e6ff6e9fb0e7a73a75d4 Mon Sep 17 00:00:00 2001 From: "jin.gao" Date: Wed, 13 Jul 2022 15:34:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=A0=BC=E5=BC=8F=E4=B9=8B=E5=90=8E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B7=B7=E4=B9=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/hooks/useStateModal.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/app/hooks/useStateModal.tsx b/frontend/src/app/hooks/useStateModal.tsx index f35d9fb90..c1741baeb 100644 --- a/frontend/src/app/hooks/useStateModal.tsx +++ b/frontend/src/app/hooks/useStateModal.tsx @@ -62,6 +62,8 @@ function useStateModal({ initState }: { initState?: any }) { Object.create(null), ...spreadParmas, ); + // @TM 清空 + stateRef.current = {}; if (isPromise(okCBResult)) return okCBResult; } catch (e) { console.error('useStateModal | exception message ---> ', e); @@ -74,6 +76,8 @@ function useStateModal({ initState }: { initState?: any }) { }; const handleClickCancelButton = () => { + // @TM 清空 + stateRef.current = {}; cancelCallbackRef.current?.call(Object.create(null), null); }; From e07f93dc101a0d582ce8df25aa94277a28e46f40 Mon Sep 17 00:00:00 2001 From: TMBigGroup <95753485+TMBigGroup@users.noreply.github.com> Date: Wed, 13 Jul 2022 18:20:16 +0800 Subject: [PATCH 2/2] chore: clear todo --- frontend/src/app/hooks/useStateModal.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/app/hooks/useStateModal.tsx b/frontend/src/app/hooks/useStateModal.tsx index c1741baeb..ca9801baf 100644 --- a/frontend/src/app/hooks/useStateModal.tsx +++ b/frontend/src/app/hooks/useStateModal.tsx @@ -62,7 +62,6 @@ function useStateModal({ initState }: { initState?: any }) { Object.create(null), ...spreadParmas, ); - // @TM 清空 stateRef.current = {}; if (isPromise(okCBResult)) return okCBResult; } catch (e) { @@ -76,7 +75,6 @@ function useStateModal({ initState }: { initState?: any }) { }; const handleClickCancelButton = () => { - // @TM 清空 stateRef.current = {}; cancelCallbackRef.current?.call(Object.create(null), null); };