diff options
author | eperelm2 <emily_perelman@brown.edu> | 2023-07-31 15:41:53 -0400 |
---|---|---|
committer | eperelm2 <emily_perelman@brown.edu> | 2023-07-31 15:41:53 -0400 |
commit | ae1c61907b6ffd0f9949d0d697bdc941eb28b7e2 (patch) | |
tree | b282a76ed19924f84cb8730f2e9a20dda1d49807 /src/fields/Doc.ts | |
parent | af5377f0e5bc69488c1620ae72b960f2a0f5d8f9 (diff) |
filters - working on range
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 203f455db..578ee1caa 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1416,14 +1416,18 @@ export namespace Doc { } export function setDocRangeFilter(container: Opt<Doc>, key: string, range?: number[]) { if (!container) return; + const childFiltersByRanges = Cast(container._childFiltersByRanges, listSpec('string'), []); + console.log("hellllloooooooooooooooooooooooooo " + childFiltersByRanges.length) for (let i = 0; i < childFiltersByRanges.length; i += 3) { + console.log("inside if statement") if (childFiltersByRanges[i] === key) { childFiltersByRanges.splice(i, 3); break; } } if (range !== undefined) { + console.log("in doc.ts in set range filter") childFiltersByRanges.push(key); childFiltersByRanges.push(range[0].toString()); childFiltersByRanges.push(range[1].toString()); |