diff --git a/src/components/ContactEdit.tsx b/src/components/ContactEdit.tsx index e0309b3..8ac8545 100644 --- a/src/components/ContactEdit.tsx +++ b/src/components/ContactEdit.tsx @@ -205,9 +205,13 @@ class ContactEdit extends React.PureComponent { if ((this.props.collections !== nextProps.collections) || (this.props.initialCollection !== nextProps.initialCollection)) { if (nextProps.initialCollection) { - this.state.journalUid = nextProps.initialCollection; + this.setState({ + journalUid: nextProps.initialCollection, + }); } else if (nextProps.collections[0]) { - this.state.journalUid = nextProps.collections[0].uid; + this.setState({ + journalUid: nextProps.collections[0].uid, + }); } } } diff --git a/src/components/EventEdit.tsx b/src/components/EventEdit.tsx index 97f1d25..513fcf9 100644 --- a/src/components/EventEdit.tsx +++ b/src/components/EventEdit.tsx @@ -118,9 +118,13 @@ class EventEdit extends React.PureComponent { if ((this.props.collections !== nextProps.collections) || (this.props.initialCollection !== nextProps.initialCollection)) { if (nextProps.initialCollection) { - this.state.journalUid = nextProps.initialCollection; + this.setState({ + journalUid: nextProps.initialCollection, + }); } else if (nextProps.collections[0]) { - this.state.journalUid = nextProps.collections[0].uid; + this.setState({ + journalUid: nextProps.collections[0].uid, + }); } } } diff --git a/src/components/TaskEdit.tsx b/src/components/TaskEdit.tsx index 31340c5..b20ea96 100644 --- a/src/components/TaskEdit.tsx +++ b/src/components/TaskEdit.tsx @@ -106,9 +106,13 @@ class TaskEdit extends React.PureComponent { if ((this.props.collections !== nextProps.collections) || (this.props.initialCollection !== nextProps.initialCollection)) { if (nextProps.initialCollection) { - this.state.journalUid = nextProps.initialCollection; + this.setState({ + journalUid: nextProps.initialCollection, + }); } else if (nextProps.collections[0]) { - this.state.journalUid = nextProps.collections[0].uid; + this.setState({ + journalUid: nextProps.collections[0].uid, + }); } } } diff --git a/src/widgets/ExternalLink.tsx b/src/widgets/ExternalLink.tsx index f8360b7..046adaa 100644 --- a/src/widgets/ExternalLink.tsx +++ b/src/widgets/ExternalLink.tsx @@ -1,8 +1,10 @@ import * as React from 'react'; import { pure } from 'recompose'; -export const ExternalLink = pure((props: any) => ( - +export const ExternalLink = pure(({children, ...props}: any) => ( + + {children} + )); export default ExternalLink;