From 93703f4c02c4c6e68489aca72bc0460efc3f6f5e Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 4 Jan 2021 13:16:13 -0500 Subject: Fixed filterbox to use scriptContext to determine where to apply/clear filters .fixed setting width/height of freeform images independent of nativeWidth/height so that % css measurements work. --- src/client/util/CurrentUserUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/client/util/CurrentUserUtils.ts') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 00ee0f4b9..382b225a4 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -795,10 +795,11 @@ export class CurrentUserUtils { treeViewTruncateTitleWidth: 150, treeViewPreventOpen: false, ignoreClick: true, lockedPosition: true, boxShadow: "0 0", dontRegisterChildViews: true, targetDropAction: "same", system: true })); - const clearAll = ScriptField.MakeScript(`getProto(self).data = new List([])`); - (doc.myFilter as any as Doc).contextMenuScripts = new List([clearAll!]); - (doc.myFilter as any as Doc).contextMenuLabels = new List(["Clear All"]); } + const clearAll = ScriptField.MakeScript(`getProto(self).data = new List([]); scriptContext._docFilters = scriptContext._docRangeFilters = undefined;`, { scriptContext: Doc.name }); + (doc.myFilter as any as Doc).contextMenuScripts = new List([clearAll!]); + (doc.myFilter as any as Doc).contextMenuLabels = new List(["Clear All"]); + } static setupUserDoc(doc: Doc) { -- cgit v1.2.3-70-g09d2