From 11bf7c3c04b875ab8c0003001df600675470dca7 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 20 Sep 2024 14:03:34 -0400 Subject: fixed filter dropdown to work properly with multiselect. --- src/client/documents/DocUtils.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/client/documents/DocUtils.ts') 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', -- cgit v1.2.3-70-g09d2