diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-04 21:45:42 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-04 21:45:42 -0400 |
| commit | 695a757e1d5d3469a9871b0760c9dedeb073a489 (patch) | |
| tree | 4f1984152b1e3f68771d8c795f4ba6b8f5e3204d /src/client/views/collections/collectionSchema | |
| parent | 9323ad30103b474e95610e97eb92916a0cf71f7b (diff) | |
from last
Diffstat (limited to 'src/client/views/collections/collectionSchema')
| -rw-r--r-- | src/client/views/collections/collectionSchema/SchemaCellField.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/collections/collectionSchema/SchemaCellField.tsx b/src/client/views/collections/collectionSchema/SchemaCellField.tsx index 84e7b62bf..ce41b2758 100644 --- a/src/client/views/collections/collectionSchema/SchemaCellField.tsx +++ b/src/client/views/collections/collectionSchema/SchemaCellField.tsx @@ -27,6 +27,7 @@ export interface SchemaCellFieldProps { oneLine?: boolean; Document: Doc; fieldKey: string; + // eslint-disable-next-line no-use-before-define refSelectModeInfo: { enabled: boolean; currEditing: SchemaCellField | undefined }; highlightCells?: (text: string) => void; GetValue(): string | undefined; @@ -301,13 +302,14 @@ export class SchemaCellField extends ObservableReactComponent<SchemaCellFieldPro setTimeout(() => this.setupRefSelect(this.refSelectConditionMet), 0); break; case ' ': - e.stopPropagation(); - let cursorPos = 0; - if (this.cursorPosition !== null) cursorPos = this.cursorPosition + 1; - setTimeout(() => { - this.setContent(this._unrenderedContent); - setTimeout(() => this.setCursorPosition(cursorPos)); - }, 0); + { + e.stopPropagation(); + const cursorPos = this.cursorPosition !== null ? this.cursorPosition + 1 : 0; + setTimeout(() => { + this.setContent(this._unrenderedContent); + setTimeout(() => this.setCursorPosition(cursorPos)); + }, 0); + } break; case 'u': // for some reason 'u' otherwise exits the editor e.stopPropagation(); @@ -318,7 +320,6 @@ export class SchemaCellField extends ObservableReactComponent<SchemaCellFieldPro case 'Control': case ':': // prettier-ignore break; - // eslint-disable-next-line no-fallthrough default: break; } |
