Finish search from header

This commit is contained in:
Tom Raithel
2017-03-21 20:57:20 +01:00
parent fd029dad9e
commit ad2b0e34ad
7 changed files with 102 additions and 43 deletions

View File

@@ -18,14 +18,23 @@ const containsSearchTerm = (text = '', term = '') => {
class PageOverview extends React.Component {
constructor(...args) {
super(...args);
constructor(props, ...args) {
super(props, ...args);
this.state = {
ring: rings[0],
search: '',
search: props.pageState.search || '',
};
}
componentWillReceiveProps(nextProps) {
if (this.search !== nextProps.pageState.search) {
this.setState({
ring: rings[0],
search: nextProps.pageState.search,
});
}
}
handleRingClick = (ring) => (e) => {
e.preventDefault();