aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-09 10:56:46 -0500
committerbobzel <zzzman@gmail.com>2024-01-09 10:56:46 -0500
commit06aaa5d58b62e7c85a81ce6b592c96cd13d16dd3 (patch)
tree228abfb3132d79f0fe36006f3eb1599ebbfed970 /src
parent5027a2e1e75294532c8bb2259a879bca75c7ec35 (diff)
fixed resizing notetaking columns
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewColumn.tsx2
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 + '%';
}