aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-22 23:55:38 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-22 23:55:38 -0400
commitfc1fd8902b090b75c81347a37cce15145322b4e2 (patch)
treed697bf1b82f1969b0c7bbc8acb8f3aaa349c40f5 /src/client/views/collections/collectionSchema
parent7f9d92b3e1d0ca433c732936eae767095c9a5e7f (diff)
moving row no longer messes up cell field (of course it was batching...)
Diffstat (limited to 'src/client/views/collections/collectionSchema')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaCellField.tsx10
1 files changed, 6 insertions, 4 deletions
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 => {