aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/KeyValueBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-12-15 12:44:20 -0500
committerBob Zeleznik <zzzman@gmail.com>2019-12-15 12:44:20 -0500
commit6683517a69f4806d026e7af85069f18b1f0a9d1f (patch)
treecfe8beeb58abae2479fc387a4636deae55f2a8cb /src/client/views/nodes/KeyValueBox.tsx
parent877a6f481a06e2454ff9d8eabe43acb0e58a2676 (diff)
added _last_ for computedScripts to access last value of script
Diffstat (limited to 'src/client/views/nodes/KeyValueBox.tsx')
-rw-r--r--src/client/views/nodes/KeyValueBox.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx
index 07d6d6f5e..234a6a9d3 100644
--- a/src/client/views/nodes/KeyValueBox.tsx
+++ b/src/client/views/nodes/KeyValueBox.tsx
@@ -57,8 +57,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> {
value = eq ? value.substr(1) : value;
const dubEq = value.startsWith(":=") ? "computed" : value.startsWith(";=") ? "script" : false;
value = dubEq ? value.substr(2) : value;
- const editable = value.includes("selectedDocs"); // bcz: Argh TODO - need a UI mechanism for letting user know that a function can't be run read-only. e.g., selectedDocs() wants to cache its old value so it can't be run read-only
- const options: ScriptOptions = { addReturn: true, params: { this: "Doc" }, editable: editable };
+ 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) {