diff options
author | bobzel <zzzman@gmail.com> | 2020-08-19 00:18:39 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-19 00:18:39 -0400 |
commit | 677d73e55fc934fac0fd1170a399359e131fef2f (patch) | |
tree | f0402b29ccaeedfd271544ed72bfd192f1e6132d | |
parent | bf4baf81576cfd7363cccdd2526914f6afd59c98 (diff) |
focus is now on new row when new doc is created.
-rw-r--r-- | src/client/views/collections/SchemaTable.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
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<SchemaTableProps> { } @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 |