diff options
author | bobzel <zzzman@gmail.com> | 2022-04-25 22:04:52 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-04-25 22:04:52 -0400 |
commit | bbb47d3d245bd2458d162bcfde0f43d54a5b425c (patch) | |
tree | 673aa2d127bf36ad6ed95bb61fba619a91c1d2c8 | |
parent | 5f297a17b38bdcd4d3928137daacf14fe2fbec9f (diff) |
fixed key value pane to allow setting values on templates using "_" prefix.
-rw-r--r-- | src/client/views/nodes/KeyValueBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/KeyValueBox.tsx b/src/client/views/nodes/KeyValueBox.tsx index c44c8c828..4b1fbaf7d 100644 --- a/src/client/views/nodes/KeyValueBox.tsx +++ b/src/client/views/nodes/KeyValueBox.tsx @@ -67,7 +67,7 @@ export class KeyValueBox extends React.Component<FieldViewProps> { public static ApplyKVPScript(doc: Doc, key: string, kvpScript: KVPScript, forceOnDelegate?: boolean): boolean { const { script, type, onDelegate } = kvpScript; //const target = onDelegate ? Doc.Layout(doc.layout) : Doc.GetProto(doc); // bcz: TODO need to be able to set fields on layout templates - const target = forceOnDelegate || onDelegate ? doc : doc.proto || doc; + const target = forceOnDelegate || onDelegate || key.startsWith("_") ? doc : doc.proto || doc; let field: Field; if (type === "computed") { field = new ComputedField(script); |