-
Notifications
You must be signed in to change notification settings - Fork 6
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
STCOM-1285 Migrate way from findDOMNode
in stripes-react-hotkeys
#44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea — let me know when it's ready for review!
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
The way to migrate away from this deprecated fallback is to use a ref/supply a known DOM element.
HotKeys
has always had theattach
prop that accepts a ref to the scoped element.If an element isn't provided, the
findDOMNode
will still be called and the error will be thrown.If the element isn't provided, the Hotkeys component will redraw so that it can pass 'findDOMNode' through to FocusTrap.
This change removes the unavoidable call to
findDOMNode
withinFocusTrap
, depending on anelement
prop to be passed in fromHotKeys
.Anticipated Migration:
to