diff options
author | bobzel <zzzman@gmail.com> | 2021-03-12 22:18:10 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-03-12 22:18:10 -0500 |
commit | b18d4d2b9a4a624e61116642d4dbfe9a53437d0c (patch) | |
tree | 95ad9705ebcff19597f8422a67918e53708daf7d /src/client/views/nodes/KeyValueBox.tsx | |
parent | 86d5114cfc8b541438dcbdfb059693763c78a986 (diff) |
prevent anything but Docs from being written to offScreenTabs. fixed tabs to activate an unrendered tab when it is uncovered for the first time.
Diffstat (limited to 'src/client/views/nodes/KeyValueBox.tsx')
-rw-r--r-- | src/client/views/nodes/KeyValueBox.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx index 8acf4081c..383650e89 100644 --- a/src/client/views/nodes/KeyValueBox.tsx +++ b/src/client/views/nodes/KeyValueBox.tsx @@ -61,10 +61,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> { const options: ScriptOptions = { addReturn: true, params: { this: "Doc", _last_: "any" }, editable: false }; if (dubEq) options.typecheck = false; const script = CompileScript(value, options); - if (!script.compiled) { - return undefined; - } - return { script, type: dubEq, onDelegate: eq }; + return !script.compiled ? undefined : { script, type: dubEq, onDelegate: eq }; } public static ApplyKVPScript(doc: Doc, key: string, kvpScript: KVPScript, forceOnDelegate?: boolean): boolean { @@ -100,9 +97,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> { e.stopPropagation(); } } - onPointerWheel = (e: React.WheelEvent): void => { - e.stopPropagation(); - } + onPointerWheel = (e: React.WheelEvent): void => e.stopPropagation(); rowHeight = () => 30; |