diff options
| author | fawn <fangrui_tong@brown.edu> | 2019-07-30 15:52:32 -0400 |
|---|---|---|
| committer | fawn <fangrui_tong@brown.edu> | 2019-07-30 15:52:32 -0400 |
| commit | dd5d7503e05962fa9a22baa9f5fa00373393ac11 (patch) | |
| tree | b146bfdea1435fde0cae720142ca433ec29c7104 /src/client/views/collections/CollectionSchemaView.tsx | |
| parent | 49355364b418ceb8f04ee79132dedc5885a9bbe5 (diff) | |
schema column menu stylign
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index 722d8b1f9..86d3d01ef 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -612,7 +612,9 @@ export class SchemaTable extends React.Component<SchemaTableProps> { } else { const index = columns.map(c => c.heading).indexOf(oldKey); if (index > -1) { - columns[index] = new SchemaHeaderField(newKey, columns[index].color); + let column = columns[index]; + column.setHeading(newKey); + columns[index] = column; this.columns = columns; } } @@ -643,8 +645,7 @@ export class SchemaTable extends React.Component<SchemaTableProps> { let columns = this.columns; let index = columns.indexOf(columnField); if (index > -1) { - // let column = columns[index]; - columnField.type = NumCast(type); + columnField.setType(NumCast(type)); columns[index] = columnField; this.columns = columns; } @@ -664,9 +665,9 @@ export class SchemaTable extends React.Component<SchemaTableProps> { let columns = this.columns; let index = columns.indexOf(columnField); if (index > -1) { - columnField.color = color; + columnField.setColor(color); columns[index] = columnField; - this.columns = columns; + this.columns = columns; // need to set the columns to trigger rerender } } |
