aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 5d8ae19fc..533df5c11 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -74,6 +74,8 @@ export class FInfo {
readOnly: boolean = false;
fieldType?: string = '';
values?: Field[];
+
+ filterable?: boolean = true;
// format?: string; // format to display values (e.g, decimal places, $, etc)
// parse?: ScriptField; // parse a value from a string
constructor(d: string, readOnly?: boolean) {
@@ -88,7 +90,7 @@ class BoolInfo extends FInfo {
class NumInfo extends FInfo {
fieldType? = 'number';
values?: number[] = [];
- constructor(d: string, readOnly?: boolean, values?: number[], filterable?:boolean) {
+ constructor(d: string, readOnly?: boolean, values?: number[], filterable?: boolean) {
super(d, readOnly);
this.values = values;
}
@@ -96,15 +98,16 @@ class NumInfo extends FInfo {
class StrInfo extends FInfo {
fieldType? = 'string';
values?: string[] = [];
- constructor(d: string, readOnly?: boolean, values?: string[], filterable?:boolean) {
+ constructor(d: string, filterable?: boolean, readOnly?: boolean, values?: string[]) {
super(d, readOnly);
this.values = values;
+ this.filterable = filterable;
}
}
class DocInfo extends FInfo {
fieldType? = 'Doc';
values?: Doc[] = [];
- constructor(d: string, filterable?:boolean, values?: Doc[] ) {
+ constructor(d: string, filterable?: boolean, values?: Doc[]) {
super(d, true);
this.values = values;
}
@@ -184,7 +187,7 @@ export class DocumentOptions {
author?: string; // STRt = new StrInfo('creator of document'); // bcz: don't change this. Otherwise, the userDoc's field Infos will have a FieldInfo assigned to its author field which will render it unreadable
author_date?: DATEt = new DateInfo('date the document was created', true);
annotationOn?: DOCt = new DocInfo('document annotated by this document', false);
- color?: STRt = new StrInfo('foreground color data doc');
+ color?: STRt = new StrInfo('foreground color data doc', true);
hidden?: BOOLt = new BoolInfo('whether the document is not rendered by its collection');
backgroundColor?: STRt = new StrInfo('background color for data doc');
opacity?: NUMt = new NumInfo('document opacity');