aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/SchemaHeaderField.ts
diff options
context:
space:
mode:
authorfawn <fangrui_tong@brown.edu>2019-07-30 13:15:19 -0400
committerfawn <fangrui_tong@brown.edu>2019-07-30 13:15:19 -0400
commit49355364b418ceb8f04ee79132dedc5885a9bbe5 (patch)
treed81c8d3e9674179d0965f8b14097210e5da63d5f /src/new_fields/SchemaHeaderField.ts
parent1d8c80a366c743479a8eb1c8c21ecad21942da73 (diff)
schema column widths get saved
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) {