Skip to content

Commit 2ff1c07

Browse files
committed
fix(AnalyticalTable): correctly log warning for column width
1 parent 6a4073d commit 2ff1c07

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/main/src/components/AnalyticalTable/hooks/useDynamicColumnWidths.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ const columns = (columns: TableInstance['columns'], { instance }: { instance: Ta
390390
return columns.map((column) => {
391391
const calculatedWidth = calculatedWidths[column.id] || calculatedWidths[column.accessor];
392392
if (typeof calculatedWidth !== 'number') {
393-
console.warn('Could not determine column width!');
393+
if (visibleColumns.length === columns.length) {
394+
console.warn('Could not determine column width!');
395+
}
394396
return column;
395397
}
396398
return { ...column, width: calculatedWidth };

packages/main/src/components/AnalyticalTable/types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,8 @@ export interface AnalyticalTableColumnDefinition {
570570
// usePopIn
571571
/**
572572
* Enables the pop-in behavior of the column. When the `responsiveMinWidth` is smaller than the width of the table, the content of each cell will move to the first cell in the row, improving usability on small or mobile devices.
573+
*
574+
* __Note:__ At least one column must remain visible at all times!
573575
*/
574576
responsivePopIn?: boolean;
575577
/**

0 commit comments

Comments
 (0)