File tree 1 file changed +12
-5
lines changed
packages/main/src/components/AnalyticalTable 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export interface ColumnConfiguration {
22
22
vAlign ?: VerticalAlign ;
23
23
canResize ?: boolean ;
24
24
minWidth ?: number ;
25
-
26
25
[ key : string ] : any ;
27
26
}
28
27
@@ -65,6 +64,8 @@ export interface TableProps extends CommonProps {
65
64
noDataText ?: string ;
66
65
stickyHeader ?: boolean ;
67
66
onSort ?: ( e ?: Event ) => void ;
67
+ useTableProps ?: object ;
68
+ tableHooks ?: Array < ( ) => any > ;
68
69
}
69
70
70
71
const useStyles = createUseStyles < JSSTheme , keyof ReturnType < typeof styles > > ( styles ) ;
@@ -100,7 +101,9 @@ export const AnalyticalTable: FC<TableProps> = forwardRef((props: TableProps, re
100
101
selectable,
101
102
onRowSelected,
102
103
stickyHeader,
103
- onSort
104
+ onSort,
105
+ useTableProps,
106
+ tableHooks
104
107
} = props ;
105
108
106
109
const [ selectedRow , setSelectedRow ] = useState ( null ) ;
@@ -188,13 +191,15 @@ export const AnalyticalTable: FC<TableProps> = forwardRef((props: TableProps, re
188
191
columns,
189
192
data,
190
193
defaultColumn,
191
- state : tableState
194
+ state : tableState ,
195
+ ...useTableProps
192
196
} ,
193
197
useFilters ,
194
198
useGroupBy ,
195
199
useSortBy ,
196
200
useExpanded ,
197
- useTableStyling
201
+ useTableStyling ,
202
+ ...tableHooks
198
203
) ;
199
204
200
205
const minimumRows = useMemo ( ( ) => {
@@ -333,5 +338,7 @@ AnalyticalTable.defaultProps = {
333
338
pivotBy : [ ] ,
334
339
NoDataComponent : DefaultNoDataComponent ,
335
340
noDataText : 'No Data' ,
336
- stickyHeader : true
341
+ stickyHeader : true ,
342
+ useTableProps : { } ,
343
+ tableHooks : [ ]
337
344
} ;
You can’t perform that action at this time.
0 commit comments