From 677d73e55fc934fac0fd1170a399359e131fef2f Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 19 Aug 2020 00:18:39 -0400 Subject: focus is now on new row when new doc is created. --- src/client/views/collections/SchemaTable.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 7913c92a4..904eaf99f 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -412,9 +412,10 @@ export class SchemaTable extends React.Component { } @undoBatch - createRow = () => { + createRow = action(() => { this.props.addDocument(Docs.Create.TextDocument("", { title: "", _width: 100, _height: 30 })); - } + this._focusedCell = { row: this.childDocs.length, col: this._focusedCell.col }; + }) @undoBatch @action -- cgit v1.2.3-70-g09d2