Skip to content

Commit

Permalink
Autofocus example
Browse files Browse the repository at this point in the history
  • Loading branch information
astralarya committed Jun 1, 2016
1 parent f142bee commit 75ee822
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let EchoConsole = React.createClass({
this.refs.console.return();
},
render: function() {
return <Console ref="console" handler={this.echo}/>;
return <Console ref="console" handler={this.echo} autofocus={true}/>;
}
});
```
Expand Down
5 changes: 4 additions & 1 deletion example/echo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ class EchoConsole extends React.Component<{},{}> {
this.child.console.return();
}
render() {
return <Console ref={ref => this.child.console = ref} handler={this.echo}/>;
return <Console ref={ref => this.child.console = ref}
handler={this.echo}
autofocus={true}
/>;
}
}

Expand Down

0 comments on commit 75ee822

Please sign in to comment.