diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-03-22 17:42:28 -0400 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-03-22 17:42:28 -0400 |
| commit | 3fed87fe05a70a5ef63ed7989c7a28faee68bf4b (patch) | |
| tree | fe4cfa2919ef4b3aa26ad898023d85ada21f6bf2 /src/client/views/collections/collectionSchema/SchemaTableCell.tsx | |
| parent | 1be46d0193752c4158cf327b8d3f7421b2d1b60f (diff) | |
shift enter shortcut to fill column
Diffstat (limited to 'src/client/views/collections/collectionSchema/SchemaTableCell.tsx')
| -rw-r--r-- | src/client/views/collections/collectionSchema/SchemaTableCell.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx index d475c3b6f..13e45963e 100644 --- a/src/client/views/collections/collectionSchema/SchemaTableCell.tsx +++ b/src/client/views/collections/collectionSchema/SchemaTableCell.tsx @@ -15,6 +15,7 @@ export interface SchemaTableCellProps { fieldKey: string; columnWidth: number; isRowActive: () => boolean | undefined; + setColumnValues: (field: string, value: string) => boolean; } @observer @@ -53,7 +54,12 @@ export class SchemaTableCell extends React.Component<SchemaTableCellProps> { <EditableView contents={<FieldView {...props} />} GetValue={() => Field.toKeyValueString(this.props.Document, this.props.fieldKey)} - SetValue={(value: string) => KeyValueBox.SetField(this.props.Document, this.props.fieldKey, value)} + SetValue={(value: string, shiftDown?: boolean, enterKey?: boolean) => { + if (shiftDown && enterKey) { + this.props.setColumnValues(this.props.fieldKey, value); + } + return KeyValueBox.SetField(this.props.Document, this.props.fieldKey, value); + }} editing={this.props.isRowActive() ? undefined : false} /> </div> |
