Skip to content

Commit

Permalink
fix problems on props.ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Clementlgz committed May 19, 2022
1 parent 6f4fdd2 commit 392974a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/portfolioPage/Corpora.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 392974a

Please sign in to comment.