aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index ad557e079..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());
@@ -1437,6 +1441,7 @@ export namespace Doc {
// all documents with the specified value for the specified key are included/excluded
// based on the modifiers :"check", "x", undefined
export function setDocFilter(container: Opt<Doc>, key: string, value: any, modifiers: 'remove' | 'match' | 'check' | 'x' | 'exists' | 'unset', toggle?: boolean, fieldPrefix?: string, append: boolean = true) {
+ console.log("in setDocFilter: key "+ key + "value " + value)
if (!container) return;
const filterField = '_' + (fieldPrefix ? fieldPrefix + '_' : '') + 'childFilters';
const childFilters = StrListCast(container[filterField]);