|
@ -9,8 +9,8 @@ import {colors, media} from 'theme'; |
|
|
|
|
|
|
|
|
class DocSearch extends Component { |
|
|
class DocSearch extends Component { |
|
|
state = { |
|
|
state = { |
|
|
disabled: false |
|
|
disabled: false, |
|
|
} |
|
|
}; |
|
|
componentDidMount() { |
|
|
componentDidMount() { |
|
|
// Initialize Algolia search.
|
|
|
// Initialize Algolia search.
|
|
|
// TODO Is this expensive? Should it be deferred until a user is about to search?
|
|
|
// TODO Is this expensive? Should it be deferred until a user is about to search?
|
|
@ -22,12 +22,12 @@ class DocSearch extends Component { |
|
|
inputSelector: '#algolia-doc-search', |
|
|
inputSelector: '#algolia-doc-search', |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
this.setState({ disabled: true}) |
|
|
this.setState({disabled: true}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|
const {disabled} = this.state |
|
|
const {disabled} = this.state; |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<form |
|
|
<form |
|
|