Skip to content

Commit

Permalink
Ignore deprecated ReactDOM methods in Context Menu singleton (#7159)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggdouglas authored Jan 14, 2025
1 parent ad452b7 commit 7d1eefe
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export function showContextMenu(
) {
const {
container = document.body,
// TODO(React 18): Replace deprecated ReactDOM methods. See: https://github.com/palantir/blueprint/issues/7165
// eslint-disable-next-line deprecation/deprecation
domRenderer = ReactDOM.render,
// TODO(React 18): Replace deprecated ReactDOM methods. See: https://github.com/palantir/blueprint/issues/7165
// eslint-disable-next-line deprecation/deprecation
domUnmounter = ReactDOM.unmountComponentAtNode,
} = options;

Expand All @@ -65,6 +69,8 @@ export function showContextMenu(
domUnmounter(contextMenuElement);
}

// TODO(React 18): Replace deprecated ReactDOM methods. See: https://github.com/palantir/blueprint/issues/7165
// eslint-disable-next-line deprecation/deprecation
domRenderer(
<OverlaysProvider>
<UncontrolledContextMenuPopover {...props} />
Expand All @@ -81,6 +87,8 @@ export function showContextMenu(
* @see https://blueprintjs.com/docs/#core/components/context-menu-popover.imperative-api
*/
export function hideContextMenu(options: DOMMountOptions<ContextMenuPopoverProps> = {}) {
// TODO(React 18): Replace deprecated ReactDOM methods. See: https://github.com/palantir/blueprint/issues/7165
// eslint-disable-next-line deprecation/deprecation
const { domUnmounter = ReactDOM.unmountComponentAtNode } = options;

if (contextMenuElement !== undefined) {
Expand Down

1 comment on commit 7d1eefe

@svc-palantir-github
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore deprecated ReactDOM methods in Context Menu singleton (#7159)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.