diff options
-rw-r--r-- | src/client/views/collections/CollectionNoteTakingViewColumn.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx index 265612d0d..3f6d3c82e 100644 --- a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx +++ b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx @@ -64,7 +64,7 @@ export class CollectionNoteTakingViewColumn extends ObservableReactComponent<CSV // columnWidth returns the width of a column in absolute pixels @computed get columnWidth() { if (!this._props.colHeaderData || !this._props.headingObject || this._props.colHeaderData.length === 1) return `${(this._props.availableWidth / this._props.PanelWidth()) * 100}%`; - const i = this._props.colHeaderData.indexOf(this._props.headingObject); + const i = this._props.colHeaderData.findIndex(hd => hd.heading === this._props.headingObject?.heading && hd.color === this._props.headingObject.color); return ((this._props.colHeaderData[i].width * this._props.availableWidth) / this._props.PanelWidth()) * 100 + '%'; } |