From 1967667bdf3c8791252fee78013b59f9516d4f71 Mon Sep 17 00:00:00 2001 From: Ben Howell Date: Thu, 19 Dec 2024 14:16:04 -0800 Subject: [PATCH] fix: Remove deprecation warning from Callout's preventDismissOnResize/Scroll/Focus --- .../react/src/components/Callout/Callout.types.ts | 12 ++++++------ .../src/components/Callout/CalloutContent.base.tsx | 3 --- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/react/src/components/Callout/Callout.types.ts b/packages/react/src/components/Callout/Callout.types.ts index 6907bb11cb898..b00e10355e5e6 100644 --- a/packages/react/src/components/Callout/Callout.types.ts +++ b/packages/react/src/components/Callout/Callout.types.ts @@ -87,23 +87,23 @@ export interface ICalloutProps extends React.HTMLAttributes, Rea isBeakVisible?: boolean; /** - * If true then the callout will not dismiss on scroll + * If true then the callout will not dismiss on scroll. + * *Note:* This property will be ignored if using `preventDismissOnEvent`. * @defaultvalue false - * @deprecated use preventDismissOnEvent callback instead */ preventDismissOnScroll?: boolean; /** - * If true then the callout will not dismiss on resize + * If true then the callout will not dismiss on resize. + * *Note:* This property will be ignored if using `preventDismissOnEvent`. * @defaultvalue false - * @deprecated use preventDismissOnEvent callback instead */ preventDismissOnResize?: boolean; /** - * If true then the callout will not dismiss when it loses focus + * If true then the callout will not dismiss when it loses focus. + * *Note:* This property will be ignored if using `preventDismissOnEvent`. * @defaultvalue false - * @deprecated use preventDismissOnEvent callback instead */ preventDismissOnLostFocus?: boolean; diff --git a/packages/react/src/components/Callout/CalloutContent.base.tsx b/packages/react/src/components/Callout/CalloutContent.base.tsx index e4acb42562bfc..9355bc972c515 100644 --- a/packages/react/src/components/Callout/CalloutContent.base.tsx +++ b/packages/react/src/components/Callout/CalloutContent.base.tsx @@ -337,11 +337,8 @@ function useDismissHandlers( { hidden, onDismiss, - // eslint-disable-next-line deprecation/deprecation preventDismissOnScroll, - // eslint-disable-next-line deprecation/deprecation preventDismissOnResize, - // eslint-disable-next-line deprecation/deprecation preventDismissOnLostFocus, dismissOnTargetClick, shouldDismissOnWindowFocus,