From 5220b9dc1f416a5e592fd359fb31033c63602e77 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Fri, 17 May 2019 23:16:11 -0400 Subject: fixed sorting within Schemas --- src/client/views/collections/CollectionSchemaView.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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 = ; let reference = React.createRef(); @@ -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} /> )} doc) { ({ Header: col, - accessor: (doc: Doc) => [doc, col], + accessor: (doc: Doc) => doc ? doc[col] : 0, id: col }))} column={{ ...ReactTableDefaults.column, Cell: this.renderCell, }} -- cgit v1.2.3-70-g09d2