Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove deprecation warning from Callout's preventDismissOnResize, etc. #33493

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: Remove deprecation warning from Callout's preventDismissOnResize and similar props",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
3 changes: 0 additions & 3 deletions packages/react/etc/react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3243,11 +3243,8 @@ export interface ICalloutProps extends React_2.HTMLAttributes<HTMLDivElement>, R
popupProps?: IPopupProps;
preferScrollResizePositioning?: boolean;
preventDismissOnEvent?: (ev: Event | React_2.FocusEvent | React_2.KeyboardEvent | React_2.MouseEvent) => boolean;
// @deprecated
preventDismissOnLostFocus?: boolean;
// @deprecated
preventDismissOnResize?: boolean;
// @deprecated
preventDismissOnScroll?: boolean;
role?: string;
setInitialFocus?: boolean;
Expand Down
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;
behowell marked this conversation as resolved.
Show resolved Hide resolved

/**
* 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
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
Loading