aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/SchemaHeaderField.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_fields/SchemaHeaderField.ts')
-rw-r--r--src/new_fields/SchemaHeaderField.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/new_fields/SchemaHeaderField.ts b/src/new_fields/SchemaHeaderField.ts
index 9f716bf9f..15b497759 100644
--- a/src/new_fields/SchemaHeaderField.ts
+++ b/src/new_fields/SchemaHeaderField.ts
@@ -49,8 +49,10 @@ export class SchemaHeaderField extends ObjectField {
color: string;
@serializable(primitive())
type: number;
+ @serializable(primitive())
+ width: number;
- constructor(heading: string = "", color: string = RandomPastel(), type?: ColumnType) {
+ constructor(heading: string = "", color: string = RandomPastel(), type?: ColumnType, width?: number) {
super();
this.heading = heading;
@@ -61,6 +63,7 @@ export class SchemaHeaderField extends ObjectField {
else {
this.type = 0;
}
+ this.width = width ? width : -1;
}
setHeading(heading: string) {