-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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: chart disappears in standalone slice when resizing #12606
fix: chart disappears in standalone slice when resizing #12606
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12606 +/- ##
==========================================
- Coverage 65.69% 63.18% -2.51%
==========================================
Files 1015 486 -529
Lines 49651 29982 -19669
Branches 4839 0 -4839
==========================================
- Hits 32618 18945 -13673
+ Misses 16889 11037 -5852
+ Partials 144 0 -144
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
b05ff76
to
b1ccd69
Compare
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.
LGTM
if (props.standalone) { | ||
// dom manipulation hack to get rid of the boostrap theme's body background | ||
const standaloneClass = 'background-transparent'; | ||
const bodyClasses = document.body.className.split(' '); | ||
if (!bodyClasses.includes(standaloneClass)) { | ||
document.body.className += ` ${standaloneClass}`; | ||
} | ||
return renderChart(); | ||
return standaloneChartBody; |
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 understand it is for consistency, but memorization is probably not needed here.
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.
Rendering a single <div>
element should be fairly efficient.
SUMMARY
Add
ref
to standalone chart renderTEST PLAN
ADDITIONAL INFORMATION