diff options
author | bobzel <zzzman@gmail.com> | 2021-04-06 14:28:56 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-04-06 14:28:56 -0400 |
commit | 46193ae586c28d5309cb0d6fa724846bb8520f20 (patch) | |
tree | 5ccb8d1c3fe57981b4be97c85ab475e258e51018 /src/fields/Doc.ts | |
parent | 998e9b239d1d97d5f4a44e8b7fb29c97e02002c4 (diff) | |
parent | 30888cd69690448e0ccf1a7a5b3fe544dea7c218 (diff) |
Merge branch 'filters' of https://github.com/browngraphicslab/Dash-Web into filters
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 44eb7536e..c1b1ed7f6 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1058,7 +1058,8 @@ export namespace Doc { prevLayout === "icon" && (doc.deiconifyLayout = undefined); doc.layoutKey = deiconify || "layout"; } - export function setDocFilterRange(container: Doc, key: string, range?: number[]) { + export function setDocRangeFilter(container: Opt<Doc>, key: string, range?: number[]) { + if (!container) return; const docRangeFilters = Cast(container._docRangeFilters, listSpec("string"), []); for (let i = 0; i < docRangeFilters.length; i += 3) { if (docRangeFilters[i] === key) { @@ -1352,4 +1353,4 @@ Scripting.addGlobal(function selectedDocs(container: Doc, excludeCollections: bo return docs.length ? new List(docs) : prevValue; }); Scripting.addGlobal(function setDocFilter(container: Doc, key: string, value: any, modifiers: "match" | "check" | "x" | "remove") { Doc.setDocFilter(container, key, value, modifiers); }); -Scripting.addGlobal(function setDocFilterRange(container: Doc, key: string, range: number[]) { Doc.setDocFilterRange(container, key, range); }); +Scripting.addGlobal(function setDocRangeFilter(container: Doc, key: string, range: number[]) { Doc.setDocRangeFilter(container, key, range); }); |