diff options
| author | Melissa Zhang <mzhang19096@gmail.com> | 2020-08-13 17:36:15 -0700 |
|---|---|---|
| committer | Melissa Zhang <mzhang19096@gmail.com> | 2020-08-13 17:36:15 -0700 |
| commit | 3c56d05d401d2015545bd42868f4fc553db6944b (patch) | |
| tree | 02ab6f240314d93aff3b2c6a6241b7aae75b16dc /src | |
| parent | efbdaf80423b82270f6d3eefc2427b1490ad36d1 (diff) | |
stopPropagation for left/right arrow keys while editing headers or cells (still buggy), removed unused code
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 6 | ||||
| -rw-r--r-- | src/client/views/collections/SchemaTable.tsx | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 892148cd7..2e9d2517c 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -132,12 +132,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { } @action - toggleIsOpen = (): void => { - this._isOpen = !this._isOpen; - this.setHeaderIsEditing(this._isOpen); - } - - @action changeColumnType = (type: ColumnType, col: any): void => { this._openTypes = false; this.setColumnType(col, type); diff --git a/src/client/views/collections/SchemaTable.tsx b/src/client/views/collections/SchemaTable.tsx index 24c2ee1ee..d997606f6 100644 --- a/src/client/views/collections/SchemaTable.tsx +++ b/src/client/views/collections/SchemaTable.tsx @@ -383,6 +383,8 @@ export class SchemaTable extends React.Component<SchemaTableProps> { const pdoc = FieldValue(this.childDocs[this._focusedCell.row]); pdoc && this.props.setPreviewDoc(pdoc); + } else if ((this._cellIsEditing || this.props.headerIsEditing) && (e.keyCode === 37 || e.keyCode === 39)) { + e.stopPropagation(); // stopPropagation for left/right arrows } } |
