aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index e2b90e26d..2b4361e50 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -66,8 +66,8 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
renderCell = (rowProps: CellInfo) => {
let props: FieldViewProps = {
- Document: rowProps.value[0],
- fieldKey: rowProps.value[1],
+ Document: rowProps.original,
+ fieldKey: rowProps.column.id as string,
ContainingCollectionView: this.props.CollectionView,
isSelected: returnFalse,
select: emptyFunction,
@@ -79,6 +79,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
whenActiveChanged: emptyFunction,
PanelHeight: returnZero,
PanelWidth: returnZero,
+ addDocTab: this.props.addDocTab,
};
let fieldContentView = <FieldView {...props} />;
let reference = React.createRef<HTMLDivElement>();
@@ -296,6 +297,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
parentActive={this.props.active}
whenActiveChanged={this.props.whenActiveChanged}
bringToFront={emptyFunction}
+ addDocTab={this.props.addDocTab}
/>
</div>)}
<input className="collectionSchemaView-input" value={this.previewScript} onChange={this.onPreviewScriptChange}
@@ -358,7 +360,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
<ReactTable data={children} page={0} pageSize={children.length} showPagination={false}
columns={this.columns.map(col => ({
Header: col,
- accessor: (doc: Doc) => [doc, col],
+ accessor: (doc: Doc) => doc ? doc[col] : 0,
id: col
}))}
column={{ ...ReactTableDefaults.column, Cell: this.renderCell, }}