From 9b403944b18f89785fbc14d5436a91451239d1d2 Mon Sep 17 00:00:00 2001 From: Lucas Rebscher Date: Tue, 4 May 2021 11:52:01 +0200 Subject: [PATCH] Fix broken usage of htmlViewer ref for netpyne-ui project --- js/components/interface/htmlViewer/HTMLViewer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/components/interface/htmlViewer/HTMLViewer.js b/js/components/interface/htmlViewer/HTMLViewer.js index 33f9be0e2..013df4ada 100644 --- a/js/components/interface/htmlViewer/HTMLViewer.js +++ b/js/components/interface/htmlViewer/HTMLViewer.js @@ -13,7 +13,7 @@ define(function (require) { super(props); this.state = { content: this.props.content, }; - + this.htmlViewer = React.createRef(); this.handleClick = this.handleClick.bind(this); } @@ -28,7 +28,7 @@ define(function (require) { } componentDidMount (){ - var element = ReactDOM.findDOMNode(this.refs.htmlViewer); + var element = ReactDOM.findDOMNode(this.htmlViewer.current); element.setAttribute('tabIndex', -1); } @@ -41,7 +41,7 @@ define(function (require) { render () { return ( -
+
)