From 392974af43619e3b37eafc3f6a6026d6808d762b Mon Sep 17 00:00:00 2001 From: Clementlgz Date: Thu, 19 May 2022 16:45:46 +0200 Subject: [PATCH] fix problems on props.ids --- src/components/portfolioPage/Corpora.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/portfolioPage/Corpora.jsx b/src/components/portfolioPage/Corpora.jsx index c89fb00e..a56594cd 100644 --- a/src/components/portfolioPage/Corpora.jsx +++ b/src/components/portfolioPage/Corpora.jsx @@ -14,12 +14,20 @@ class Corpora extends Component { }; sort = memoize((items, criteria) => items.sort(by(`${criteria}.0`))); +<<<<<<< HEAD componentWillReceiveProps(props) { this.setState({ listCorpus: [ ...props.ids] }) } +======= + componentWillReceiveProps(props) { + this.setState({ + listCorpus: [ ...props.ids ] + }); + } +>>>>>>> fix problems on props.ids render() { let itemsData = this.sort(this.props.items, this.state.criteria); let items = itemsData.map(x => @@ -86,7 +94,7 @@ class Corpora extends Component { isChecked(corpus) { let list = this.state.listCorpus; - if (!list.includes(corpus)) { + if (list.includes(corpus)) { return true; } return false;