diff options
author | bobzel <zzzman@gmail.com> | 2021-01-04 13:16:13 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-01-04 13:16:13 -0500 |
commit | 93703f4c02c4c6e68489aca72bc0460efc3f6f5e (patch) | |
tree | 24902b2dc24bbb33dd8518b961e1ff4ef6e5f026 /src/client/util/CurrentUserUtils.ts | |
parent | e59f88e1af2ca691bd48188e5bef9e6a4d4e2dab (diff) |
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.
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 7 |
1 files changed, 4 insertions, 3 deletions
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<ScriptField>([clearAll!]); - (doc.myFilter as any as Doc).contextMenuLabels = new List<string>(["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<ScriptField>([clearAll!]); + (doc.myFilter as any as Doc).contextMenuLabels = new List<string>(["Clear All"]); + } static setupUserDoc(doc: Doc) { |