diff --git a/src/components/portfolioPage/Corpora.jsx b/src/components/portfolioPage/Corpora.jsx index 72f7e8de..00b1e4c5 100644 --- a/src/components/portfolioPage/Corpora.jsx +++ b/src/components/portfolioPage/Corpora.jsx @@ -14,12 +14,11 @@ class Corpora extends Component { }; sort = memoize((items, criteria) => items.sort(by(`${criteria}.0`))); - componentWillReceiveProps(props) { this.setState({ - listCorpus: props.ids - }) -} + listCorpus: [ ...props.ids ] + }); + } render() { let itemsData = this.sort(this.props.items, this.state.criteria); let items = itemsData.map(x => @@ -86,7 +85,7 @@ class Corpora extends Component { isChecked(corpus) { let list = this.state.listCorpus; - if (!list.includes(corpus)) { + if (list.includes(corpus)) { return true; } return false;