aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authoreperelm2 <emily_perelman@brown.edu>2023-08-01 16:04:46 -0400
committereperelm2 <emily_perelman@brown.edu>2023-08-01 16:04:46 -0400
commitd9f9eb5a89b14a3f9f6847ecd405c2142058b0d5 (patch)
tree10f98dd93531daee85f2e7f202a77d4cff85ae09 /src/fields/Doc.ts
parentfde0f815b3459d39b642d66c1c4466d9a9504979 (diff)
filter - made bobs comments with basic slider implementation
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 578ee1caa..d07028ec2 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -1414,11 +1414,10 @@ export namespace Doc {
prevLayout === 'icon' && (doc.deiconifyLayout = undefined);
doc.layout_fieldKey = deiconify || 'layout';
}
- export function setDocRangeFilter(container: Opt<Doc>, key: string, range?: number[]) {
+ export function setDocRangeFilter(container: Opt<Doc>, key: string, range?: readonly 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) {
@@ -1441,7 +1440,6 @@ 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]);