diff options
author | bobzel <zzzman@gmail.com> | 2024-09-20 14:03:34 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-09-20 14:03:34 -0400 |
commit | 11bf7c3c04b875ab8c0003001df600675470dca7 (patch) | |
tree | f15137d7f05f00d547e3cbabd92f540881fd1954 /src/client/documents/DocUtils.ts | |
parent | cf7216aec2fd61bc7de43240586532b5d54e7d8b (diff) |
fixed filter dropdown to work properly with multiselect.
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-rw-r--r-- | src/client/documents/DocUtils.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts index 30b71a09b..4d105e372 100644 --- a/src/client/documents/DocUtils.ts +++ b/src/client/documents/DocUtils.ts @@ -241,7 +241,10 @@ export namespace DocUtils { Object.keys(scripts).forEach(key => { const script = scripts[key] as string; if (ScriptCast(doc[key])?.script.originalScript !== scripts[key] && script) { + const additionalItems: { [key: string]: unknown } = {}; + script.match(/_[a-zA-Z]*_/)?.forEach(match => (additionalItems[match] = 'any')); (key.startsWith('_') ? doc : Doc.GetProto(doc))[key] = ScriptField.MakeScript(script, { + ...additionalItems, this: Doc.name, dragData: Doc.DocDragDataName, value: 'any', |