-
Notifications
You must be signed in to change notification settings - Fork 356
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
Charts - replace getResizeObserver #8533
Conversation
Preview: https://patternfly-react-pr-8533.surge.sh A11y report: https://patternfly-react-pr-8533-a11y.surge.sh |
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.
Just wanted to confirm:
For the v5 branch, PF's getResizeObserver doesn't default to true, which is what should be passed in when the handleResize param isn't debounced and should be passed as a callback to requestAnimationFrame
. Did you want to update any of the examples to pass in true
to that third param?
@thatblindgeye Using We had used |
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.
Sounds good! Just wanted to make sure in case.
Your changes have been released in:
Thanks for your contribution! 🎉 |
* chore(charts): fix typo * feat(charts): replace getResizeObserver with same function from react-core fixes patternfly#8531
Removed the
getResizeObserver
function from react-charts in favor of react-core'sgetResizeObserver
. This helper function now has a third parameter,useRequestAnimationFrame
, and allows a single function to be maintained going forward.pf-codemods README: patternfly/pf-codemods#206
Closes #8531