Skip to content

Commit 2337db1

Browse files
authored
fix(AnalyticalTable - TypeScript): fix ref type (#3815)
1 parent 72e8cd7 commit 2337db1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/main/src/components/AnalyticalTable/AnalyticalTable.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ For more details on this behavior you can double check the [react-table docs](ht
786786
787787
### How to scroll to a specific row/offset?
788788
789-
The instance of the `AnalyticalTable` exposes methods for scrolling to a specific index or offset. (You can access the instance e.g. by creating a `Ref`)
789+
The DOM instance of the `AnalyticalTable` exposes methods for scrolling to a specific index or offset. (You can access the DOM element e.g. by creating a Ref `ref={analyticalTableRef}`)
790790
791791
- `scrollTo: (offset: number, align?: 'start' | 'center' | 'end' | 'auto') => void`
792792
- `scrollToItem: (index: number, align?: 'start' | 'center' | 'end' | 'auto') => void`

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ const useStyles = createUseStyles(styles, { name: 'AnalyticalTable' });
549549
* The `AnalyticalTable` provides a set of convenient functions for responsive table design, including virtualization of rows and columns, infinite scrolling and customizable columns that will, unless otherwise defined, distribute the available space equally among themselves.
550550
* It also provides several possibilities for working with the data, including sorting, filtering, grouping and aggregation.
551551
*/
552-
const AnalyticalTable = forwardRef<HTMLDivElement, AnalyticalTablePropTypes>((props, ref) => {
552+
const AnalyticalTable = forwardRef<AnalyticalTableDomRef, AnalyticalTablePropTypes>((props, ref) => {
553553
const {
554554
alternateRowColor,
555555
alwaysShowSubComponent,

0 commit comments

Comments
 (0)