aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-02-28 21:15:37 -0500
committermehekj <mehek.jethani@gmail.com>2023-02-28 21:15:37 -0500
commit4137fa5fedae84aa781f3ba22ddfb2410a0cad9a (patch)
tree100f24dd02103a486242fbdb45a412ded6a2ef33 /src/client/views/collections/collectionSchema/SchemaRowBox.tsx
parent027c89584d087ada9d45a46cb620b157ae29d0b9 (diff)
preserve sort when adding docs, break sort when rearranging
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaRowBox.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 0ed5f2df4..d6a00966d 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -113,7 +113,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() {
className="schema-row-button"
onPointerDown={undoBatch(e => {
e.stopPropagation();
- this.props.removeDocument?.(this.props.Document);
+ this.props.removeDocument?.(this.rootDoc);
})}>
<FontAwesomeIcon icon="times" />
</div>
@@ -121,14 +121,14 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() {
className="schema-row-button"
onPointerDown={e => {
e.stopPropagation();
- this.props.addDocTab(this.props.Document, OpenWhere.addRight);
+ this.props.addDocTab(this.rootDoc, OpenWhere.addRight);
}}>
<FontAwesomeIcon icon="external-link-alt" />
</div>
</div>
<div className="row-cells">
{this.schemaView?.columnKeys?.map((key, index) => (
- <SchemaTableCell key={key} Document={this.props.Document} fieldKey={key} columnWidth={this.schemaView?.displayColumnWidths[index] ?? CollectionSchemaView._minColWidth} />
+ <SchemaTableCell key={key} Document={this.rootDoc} fieldKey={key} columnWidth={this.schemaView?.displayColumnWidths[index] ?? CollectionSchemaView._minColWidth} />
))}
</div>
</div>