switch to react refs
This commit is contained in:
parent
6cba157687
commit
8de170135e
1 changed files with 2 additions and 1 deletions
|
@ -2,13 +2,14 @@ import React from 'react';
|
||||||
|
|
||||||
class TextOutput extends React.Component {
|
class TextOutput extends React.Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
document.getElementById('canvas-sub').focus();
|
this.refs.canvasTextOutput.focus();
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
className="text-output"
|
className="text-output"
|
||||||
id="canvas-sub"
|
id="canvas-sub"
|
||||||
|
ref="canvasTextOutput"
|
||||||
tabIndex="0"
|
tabIndex="0"
|
||||||
aria-label="text-output"
|
aria-label="text-output"
|
||||||
title="canvas text output"
|
title="canvas text output"
|
||||||
|
|
Loading…
Reference in a new issue