diff options
-rw-r--r-- | src/client/views/collections/CollectionNoteTakingView.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index ec849d89d..5c8b10ae1 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -590,13 +590,8 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti @undoBatch @action addGroup = (value: string) => { - if (value && this.columnHeaders) { - this.resizeColumns(this.columnHeaders.length + 1); - const schemaHdrField = new SchemaHeaderField(value); - this.columnHeaders.push(schemaHdrField); - return true; - } - return false; + const columnHeaders = Cast(this.props.Document.columnHeaders, listSpec(SchemaHeaderField), null); + return value && columnHeaders?.push(new SchemaHeaderField(value)) ? true : false; }; sortFunc = (a: [SchemaHeaderField, Doc[]], b: [SchemaHeaderField, Doc[]]): 1 | -1 => { |