diff --git a/src/Pim/index.tsx b/src/Pim/index.tsx index e160c7f..c9286dd 100644 --- a/src/Pim/index.tsx +++ b/src/Pim/index.tsx @@ -157,6 +157,7 @@ const CollectionRoutes = withStyles(styles)(withRouter( render={() => ( {(itemUid in props.items) && {(itemUid in props.items) && { this.onDeleteRequest = this.onDeleteRequest.bind(this); } - public UNSAFE_componentWillReceiveProps(nextProps: any) { - if ((this.props.collections !== nextProps.collections) || - (this.props.initialCollection !== nextProps.initialCollection)) { - if (nextProps.initialCollection) { - this.setState({ - journalUid: nextProps.initialCollection, - }); - } else if (nextProps.collections[0]) { - this.setState({ - journalUid: nextProps.collections[0].uid, - }); - } - } - } - public addValueType(name: string, _type?: string) { const type = _type ? _type : 'home'; this.setState((prevState) => { diff --git a/src/components/EventEdit.tsx b/src/components/EventEdit.tsx index 726eed7..b9ee0bc 100644 --- a/src/components/EventEdit.tsx +++ b/src/components/EventEdit.tsx @@ -148,21 +148,6 @@ class EventEdit extends React.PureComponent { this.handleCloseToast = this.handleCloseToast.bind(this); } - public UNSAFE_componentWillReceiveProps(nextProps: any) { - if ((this.props.collections !== nextProps.collections) || - (this.props.initialCollection !== nextProps.initialCollection)) { - if (nextProps.initialCollection) { - this.setState({ - journalUid: nextProps.initialCollection, - }); - } else if (nextProps.collections[0]) { - this.setState({ - journalUid: nextProps.collections[0].uid, - }); - } - } - } - public handleChange(name: string, value: string) { this.setState({ [name]: value, diff --git a/src/components/Tasks/TaskEdit.tsx b/src/components/Tasks/TaskEdit.tsx index 6c37b69..b1dea69 100644 --- a/src/components/Tasks/TaskEdit.tsx +++ b/src/components/Tasks/TaskEdit.tsx @@ -142,21 +142,6 @@ class TaskEdit extends React.PureComponent { this.handleCloseToast = this.handleCloseToast.bind(this); } - public UNSAFE_componentWillReceiveProps(nextProps: any) { - if ((this.props.collections !== nextProps.collections) || - (this.props.initialCollection !== nextProps.initialCollection)) { - if (nextProps.initialCollection) { - this.setState({ - journalUid: nextProps.initialCollection, - }); - } else if (nextProps.collections[0]) { - this.setState({ - journalUid: nextProps.collections[0].uid, - }); - } - } - } - public handleChange(name: string, value: string | number | string[]) { this.setState({ [name]: value,