Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
Use callback-style ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
nchevobbe committed Apr 23, 2018
1 parent 74f2184 commit 3983762
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/devtools-launchpad/src/components/LandingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class LandingPage extends Component {
}

componentDidUpdate() {
if (this.refs.filterInput) {
this.refs.filterInput.focus();
if (this.filterInput) {
this.filterInput.focus();
}
}

Expand Down Expand Up @@ -192,7 +192,9 @@ class LandingPage extends Component {
return dom.header(
{},
dom.input({
ref: "filterInput",
ref: node => {
this.filterInput = node;
},
placeholder: "Filter tabs",
value: filterString,
autoFocus: true,
Expand Down

0 comments on commit 3983762

Please sign in to comment.