Skip to content

Commit 5fabdb3

Browse files
authored
Merge pull request #91 from fusioncharts/bugfix/SUPPORT-2435
React-fusioncharts component is unable to render inside shadow dom
2 parents 2dd8892 + 5c6fc28 commit 5fabdb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ReactFC.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ class ReactFC extends React.Component {
264264
const currentOptions = this.resolveChartOptions(this.props);
265265
const events = {};
266266
// passing the actual DOM element
267-
if (this.containerRef.current) {
267+
if (this.containerRef.current && this.props.renderInShadowDom) {
268268
currentOptions.renderAt = this.containerRef.current;
269269
} else {
270-
currentOptions.renderAt = this.containerId; // Fall back to ID
270+
currentOptions.renderAt = this.containerId;
271271
}
272272

273273
Object.keys(this.props).forEach(value => {

0 commit comments

Comments
 (0)