Skip to content

Commit 6710b18

Browse files
authored
fix(AnalyticalTable): revert deprecation of scaleXFactor (#5239)
1 parent 691399e commit 6710b18

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/main/src/components/AnalyticalTable/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ const AnalyticalTable = forwardRef<AnalyticalTableDomRef, AnalyticalTablePropTyp
125125
renderRowSubComponent,
126126
rowHeight,
127127
scaleWidthMode,
128+
scaleXFactor,
128129
selectedRowIds,
129130
selectionBehavior,
130131
selectionMode,
@@ -573,8 +574,8 @@ const AnalyticalTable = forwardRef<AnalyticalTableDomRef, AnalyticalTablePropTyp
573574
horizontal: true,
574575
overscan: isRtl ? Infinity : overscanCountHorizontal,
575576
indexAttribute: 'data-column-index',
576-
// necessary as otherwise values are rounded which leads to wrong total width calculation
577-
measureElement: (el) => el.getBoundingClientRect().width
577+
// necessary as otherwise values are rounded which leads to wrong total width calculation leading to unnecessary scrollbar
578+
measureElement: !scaleXFactor || scaleXFactor === 1 ? (el) => el.getBoundingClientRect().width : undefined
578579
});
579580

580581
useEffect(() => {

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,6 @@ export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {
430430
scaleWidthMode?: AnalyticalTableScaleWidthMode | keyof typeof AnalyticalTableScaleWidthMode | TableScaleWidthMode;
431431
/**
432432
* Defines the number of the CSS `scaleX(sx: number)` function. `sx` is representing the abscissa of the scaling vector.
433-
*
434-
* __Note:__ As of `v1.20.0` this prop has no effect, since scaling is now supported out of the box.
435-
*
436-
* @deprecated: This prop has no effect, since scaling is now supported out of the box. It will be removed with our next major release.
437433
*/
438434
scaleXFactor?: number;
439435
/**

0 commit comments

Comments
 (0)