Skip to content

Commit

Permalink
fix: Remove deprecation warning from Callout's preventDismissOnResize…
Browse files Browse the repository at this point in the history
…/Scroll/Focus
  • Loading branch information
behowell committed Dec 19, 2024
1 parent 7f1647f commit 1967667
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 6 additions & 6 deletions packages/react/src/components/Callout/Callout.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,23 @@ export interface ICalloutProps extends React.HTMLAttributes<HTMLDivElement>, 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;

Expand Down
3 changes: 0 additions & 3 deletions packages/react/src/components/Callout/CalloutContent.base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1967667

Please sign in to comment.