diff options
| author | bobzel <zzzman@gmail.com> | 2020-12-10 11:58:25 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-12-10 11:58:25 -0500 |
| commit | 81ee0bf99da264b76f26a21d57259d478cac07f3 (patch) | |
| tree | 200a0e18ecfd3812d62aea722782b9d007f99964 /src/client/views/collections/CollectionSchemaView.tsx | |
| parent | 3412313dcde569f1f23616fa5e8a92c3985e0449 (diff) | |
fixed filterBox/TreeView to support checkboxes again. Simplified {DocumentView/CollectionView/FieldView}props
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 8ae70ce20..e22b8effe 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -484,7 +484,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { const cm = ContextMenu.Instance; const options = cm.findByDescription("Options..."); const optionItems: ContextMenuProps[] = options && "subitems" in options ? options.subitems : []; - optionItems.push({ description: "remove", event: () => this._previewDoc && this.props.removeDocument(this._previewDoc), icon: "trash" }); + optionItems.push({ description: "remove", event: () => this._previewDoc && this.props.removeDocument?.(this._previewDoc), icon: "trash" }); !options && cm.addItem({ description: "Options...", subitems: optionItems, icon: "compass" }); cm.displayMenu(e.clientX, e.clientY); (e.nativeEvent as any).SchemaHandled = true; // not sure why this is needed, but if you right-click quickly on a cell, the Document/Collection contextMenu handlers still fire without this. |
