From 655631ddf059ce58066d5384d0ae186d7abc09a9 Mon Sep 17 00:00:00 2001 From: Ely Lucas Date: Thu, 7 Oct 2021 13:18:10 -0600 Subject: [PATCH] fix(react): fix to regression in overlay hooks dimiss method (#24038) resolves #24030 --- packages/react/src/hooks/useController.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/react/src/hooks/useController.ts b/packages/react/src/hooks/useController.ts index 39da2294834..b6aa986f08a 100644 --- a/packages/react/src/hooks/useController.ts +++ b/packages/react/src/hooks/useController.ts @@ -50,13 +50,10 @@ export function useController( [controller] ); - const dismiss = useCallback( - () => async () => { - overlayRef.current && (await overlayRef.current.dismiss()); - overlayRef.current = undefined; - }, - [] - ); + const dismiss = useCallback(async () => { + overlayRef.current && (await overlayRef.current.dismiss()); + overlayRef.current = undefined; + }, []); return { present,