Skip to content

fix(AnalyticalTable): revert deprecation of scaleXFactor #5239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/main/src/components/AnalyticalTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const AnalyticalTable = forwardRef<AnalyticalTableDomRef, AnalyticalTablePropTyp
renderRowSubComponent,
rowHeight,
scaleWidthMode,
scaleXFactor,
selectedRowIds,
selectionBehavior,
selectionMode,
Expand Down Expand Up @@ -573,8 +574,8 @@ const AnalyticalTable = forwardRef<AnalyticalTableDomRef, AnalyticalTablePropTyp
horizontal: true,
overscan: isRtl ? Infinity : overscanCountHorizontal,
indexAttribute: 'data-column-index',
// necessary as otherwise values are rounded which leads to wrong total width calculation
measureElement: (el) => el.getBoundingClientRect().width
// necessary as otherwise values are rounded which leads to wrong total width calculation leading to unnecessary scrollbar
measureElement: !scaleXFactor || scaleXFactor === 1 ? (el) => el.getBoundingClientRect().width : undefined
});

useEffect(() => {
Expand Down
4 changes: 0 additions & 4 deletions packages/main/src/components/AnalyticalTable/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,6 @@ export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {
scaleWidthMode?: AnalyticalTableScaleWidthMode | keyof typeof AnalyticalTableScaleWidthMode | TableScaleWidthMode;
/**
* Defines the number of the CSS `scaleX(sx: number)` function. `sx` is representing the abscissa of the scaling vector.
*
* __Note:__ As of `v1.20.0` this prop has no effect, since scaling is now supported out of the box.
*
* @deprecated: This prop has no effect, since scaling is now supported out of the box. It will be removed with our next major release.
*/
scaleXFactor?: number;
/**
Expand Down