diff options
-rw-r--r-- | src/client/views/EditableView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/collections/collectionSchema/SchemaCellField.tsx | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index 78977bcb8..8e48b4c11 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -193,7 +193,7 @@ export class EditableView extends ObservableReactComponent<EditableProps> { @action onClick = (e?: React.MouseEvent) => { this._props.onClick && this._props.onClick(); - if (this._props.editing !== false) { + if (this._props.editing) { e?.nativeEvent.stopPropagation(); if (this._ref.current && this._props.showMenuOnLoad) { this._props.menuCallback?.(this._ref.current.getBoundingClientRect().x, this._ref.current.getBoundingClientRect().y); diff --git a/src/client/views/collections/collectionSchema/SchemaCellField.tsx b/src/client/views/collections/collectionSchema/SchemaCellField.tsx index e2aa27a95..ffda334ec 100644 --- a/src/client/views/collections/collectionSchema/SchemaCellField.tsx +++ b/src/client/views/collections/collectionSchema/SchemaCellField.tsx @@ -34,15 +34,17 @@ export class SchemaCellField extends ObservableReactComponent<SchemaCellFieldPro constructor(props: SchemaCellFieldProps) { super(props); makeObservable(this); + setTimeout(() => { + this._unrenderedContent = this._props.GetValue() ?? ''; + this.setContent(this._unrenderedContent, true); + }, 0); //must be moved to end of batch or else other docs aren't loaded, so render as d-1 in function } get docIndex(){return DocumentView.getDocViewIndex(this._props.Document);} // prettier-ignore componentDidMount(): void { - setTimeout(() => { - this._unrenderedContent = this._props.GetValue() ?? ''; - this.setContent(this._unrenderedContent, true); - }, 0); //must be moved to end of batch or else other docs aren't loaded, so render as d-1 in function + this._unrenderedContent = this._props.GetValue() ?? ''; + this.setContent(this._unrenderedContent, true); this._disposers.editing = reaction( () => this._editing, editing => { |