diff options
author | bobzel <zzzman@gmail.com> | 2024-04-10 14:04:25 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-10 14:04:25 -0400 |
commit | ffb6621a7f822c3d605e4749b3f3be799ad1ef94 (patch) | |
tree | 67eb2f2ebde057a1c456dac38193e2ea8edcdb0d /src | |
parent | be1ac92cdc609a7931ec8427f507648da117b4ea (diff) |
enabled a notetaking category field other than 'NotetakingCategory'
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionNoteTakingView.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index 12e2cc1a8..5c52d2398 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -41,7 +41,9 @@ export class CollectionNoteTakingView extends CollectionSubView() { _disposers: { [key: string]: IReactionDisposer } = {}; _masonryGridRef: HTMLDivElement | null = null; _draggerRef = React.createRef<HTMLDivElement>(); - notetakingCategoryField = 'NotetakingCategory'; + @computed get notetakingCategoryField() { + return StrCast(this.dataDoc.notetaking_category, 'NotetakingCategory'); + } public DividerWidth = 16; @observable docsDraggedRowCol: number[] = []; @observable _scroll = 0; @@ -370,7 +372,7 @@ export class CollectionNoteTakingView extends CollectionSubView() { // we alter the pivot fields of the docs in case they are moved to a new column. const colIndex = this.getColumnFromXCoord(xCoord); const colHeader = colIndex === undefined ? 'unset' : StrCast(this.colHeaderData[colIndex].heading); - DragManager.docsBeingDragged.forEach(d => (d[this.notetakingCategoryField] = colHeader)); + DragManager.docsBeingDragged.map(doc => doc[DocData]).forEach(d => (d[this.notetakingCategoryField] = colHeader)); // used to notify sections to re-render this.docsDraggedRowCol.length = 0; const columnFromCoord = this.getColumnFromXCoord(xCoord); |