Skip to content

Commit 0378005

Browse files
Jianrong-YuLukas742
andcommitted
fix(AnalyticalTable): apply suggestions from code review about enhance the types of accessor and onRowClick
Co-authored-by: Lukas Harbarth <[email protected]>
1 parent d3cb940 commit 0378005

File tree

1 file changed

+2
-2
lines changed
  • packages/main/src/components/AnalyticalTable/types

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export interface AnalyticalTableColumnDefinition {
329329
* __Note__: You can also specify deeply nested values with accessors like `info.hobby` or even `address[0].street`
330330
* __Note__: If no `accessor` is set, or the `accessor` is a function, the `id` property has to be set.
331331
*/
332-
accessor?: string | ((row: Record<string, any>, rowIndex: number) => any);
332+
accessor?: string | ((originalRow: Record<string, any>, rowIndex: number, row: RowType, parentRows: RowType[], data: Record<string, any>[]) => any);
333333
/**
334334
* Defines the unique ID for the column. It is used by reference in things like sorting, grouping, filtering etc.
335335
*
@@ -542,7 +542,7 @@ interface OnAutoResizeMouseEvent extends Omit<MouseEvent, 'detail'> {
542542
}
543543

544544
interface OnRowClickEvent extends Omit<UIEvent, 'detail'> {
545-
detail: { row: unknown; nativeDetail: number };
545+
detail: { row: RowType; nativeDetail: number };
546546
}
547547

548548
export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {

0 commit comments

Comments
 (0)