Fixes: New document menu item not working:
This commit is contained in:
@ -20,17 +20,20 @@ class CollectionMenu extends Component {
|
|||||||
collection: Collection,
|
collection: Collection,
|
||||||
};
|
};
|
||||||
|
|
||||||
onNewDocument = () => {
|
onNewDocument = (ev: SyntheticEvent) => {
|
||||||
|
ev.preventDefault();
|
||||||
const { collection, history } = this.props;
|
const { collection, history } = this.props;
|
||||||
history.push(`${collection.url}/new`);
|
history.push(`${collection.url}/new`);
|
||||||
};
|
};
|
||||||
|
|
||||||
onEdit = () => {
|
onEdit = (ev: SyntheticEvent) => {
|
||||||
|
ev.preventDefault();
|
||||||
const { collection } = this.props;
|
const { collection } = this.props;
|
||||||
this.props.ui.setActiveModal('collection-edit', { collection });
|
this.props.ui.setActiveModal('collection-edit', { collection });
|
||||||
};
|
};
|
||||||
|
|
||||||
onDelete = () => {
|
onDelete = (ev: SyntheticEvent) => {
|
||||||
|
ev.preventDefault();
|
||||||
const { collection } = this.props;
|
const { collection } = this.props;
|
||||||
this.props.ui.setActiveModal('collection-delete', { collection });
|
this.props.ui.setActiveModal('collection-delete', { collection });
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user