forked from newthuhole/hole_thu_frontend
add auto link
This commit is contained in:
10
src/Title.js
10
src/Title.js
@@ -42,6 +42,16 @@ class ControlBar extends Component {
|
||||
this.set_search_text=props.set_search_text;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if(window.location.hash) {
|
||||
const text=window.location.hash.substr(1);
|
||||
this.setState({
|
||||
search_text: text,
|
||||
});
|
||||
this.set_search_text(text);
|
||||
}
|
||||
}
|
||||
|
||||
on_change(event) {
|
||||
this.setState({
|
||||
search_text: event.target.value,
|
||||
|
||||
Reference in New Issue
Block a user