@@ -2,6 +2,7 @@ import { createComponentStyles } from '@ui5/webcomponents-react-base/lib/createC
2
2
import { usePassThroughHtmlProps } from '@ui5/webcomponents-react-base/lib/usePassThroughHtmlProps' ;
3
3
import { enrichEventWithDetails } from '@ui5/webcomponents-react-base/lib/Utils' ;
4
4
import { TableScaleWidthMode } from '@ui5/webcomponents-react/lib/TableScaleWidthMode' ;
5
+ import { ValueState } from '@ui5/webcomponents-react/lib/ValueState' ;
5
6
import { TableSelectionBehavior } from '@ui5/webcomponents-react/lib/TableSelectionBehavior' ;
6
7
import { TableSelectionMode } from '@ui5/webcomponents-react/lib/TableSelectionMode' ;
7
8
import debounce from 'lodash.debounce' ;
@@ -56,7 +57,7 @@ export interface TableProps extends CommonProps {
56
57
* Please look at the [AnalyticalTableColumnDefinition interface](#column-properties) for a full list of options.
57
58
*/
58
59
columns : AnalyticalTableColumnDefinition [ ] ;
59
- data : object [ ] ;
60
+ data : Record < any , any > [ ] ;
60
61
61
62
/**
62
63
* Component or text of title section of the Table (if not set it will be hidden)
@@ -75,8 +76,19 @@ export interface TableProps extends CommonProps {
75
76
noDataText ?: string ;
76
77
rowHeight ?: number ;
77
78
alternateRowColor ?: boolean ;
79
+ /**
80
+ * Flag whether the table should add an extra column for displaying row highlights, based on the `highlightField` prop.
81
+ */
78
82
withRowHighlight ?: boolean ;
79
- highlightField ?: string ;
83
+ /**
84
+ * Accessor for showing the row highlights. Only taken into account when `withRowHighlight` is set.
85
+ *
86
+ * Default Value: `status`.
87
+ *
88
+ * The value of this prop can either be a `string` pointing to a `ValueState` in your dataset
89
+ * or an accessor function which should return a `ValueState`.
90
+ */
91
+ highlightField ?: string | ( ( row : Record < any , any > ) => ValueState ) ;
80
92
81
93
// features
82
94
filterable ?: boolean ;
@@ -86,7 +98,7 @@ export interface TableProps extends CommonProps {
86
98
selectionBehavior ?: TableSelectionBehavior ;
87
99
selectionMode ?: TableSelectionMode ;
88
100
scaleWidthMode ?: TableScaleWidthMode ;
89
- columnOrder ?: object [ ] ;
101
+ columnOrder ?: string [ ] ;
90
102
infiniteScroll ?: boolean ;
91
103
infiniteScrollThreshold ?: number ;
92
104
@@ -462,6 +474,7 @@ AnalyticalTable.defaultProps = {
462
474
tableHooks : [ ] ,
463
475
visibleRows : 15 ,
464
476
subRowsKey : 'subRows' ,
477
+ highlightField : 'status' ,
465
478
selectedRowIds : { } ,
466
479
onGroup : ( ) => { } ,
467
480
onRowExpandChange : ( ) => { } ,
0 commit comments