web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Answered

Deprecated "findDOMNode" in Checkout module while clone

(0) ShareShare
ReportReport
Posted on by
I'm getting an error after cloning the Checkout Module in D365 Commerce after extending the theme, is there any possible ways for an alternate solution? 
 
---------------------------
private readonly focusOnFirstFocusableElement = (): void => {
        const node = ReactDOM.findDOMNode(this) as HTMLElement;
        const focussableElements = `
             a:not([disabled]),
             button:not([disabled]),
             input[type=submit]:not([disabled]),
             input[type=checkbox]:not([disabled]),
             input[type=text]:not([disabled]),
             input[type=radio]:not([disabled]),
             input[type=password]:not([disabled]),
             select:not([disabled]),
             textarea:not([disabled]),
             [tabindex]:not([disabled]):not([tabindex="-1"])
         `;

        const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);
        child && child.focus && child.focus();
    };
I have the same question (0)
  • Verified answer
    WillWU Profile Picture
    22,361 on at

    Hi partner,

    It might because of the strict mode in React.

    StrictMode currently helps with warning about deprecated findDOMNode usage, when strict mode is enabled, React compiles a list of all class components using the unsafe lifecycles, and logs a warning message with information about these components.

    Please try to change <React.StrictMode><App /><React.StrictMode> to <App /> in index.js

    Such as the following screenshots

    pastedimage1639102591082v1.png

    You have to comment it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 266 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 140 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans