Added caching of loaded editor instance

This commit is contained in:
Tom Moor
2019-01-19 01:31:34 -08:00
parent 72d8abe069
commit bfd32843ff
7 changed files with 31 additions and 3 deletions

View File

@ -25,6 +25,10 @@ type Props = {
class DocumentMenu extends React.Component<Props> {
@observable redirectTo: ?string;
componentDidUpdate() {
this.redirectTo = undefined;
}
handleNewChild = (ev: SyntheticEvent<*>) => {
const { document } = this.props;
this.redirectTo = `${document.collection.url}/new?parentDocument=${