File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
client/packages/lowcoder/src/comps/comps/tableComp Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const CellColorTempComp = withContext(
67
67
} )
68
68
)
69
69
. build ( ) ,
70
- [ "currentCell" ] as const
70
+ [ "currentCell" , "currentRow" ] as const
71
71
) ;
72
72
73
73
// @ts -ignore
@@ -79,6 +79,7 @@ export class CellColorComp extends CellColorTempComp {
79
79
80
80
// fixme, should be infer from RowColorComp, but withContext type incorrect
81
81
export type CellColorViewType = ( param : {
82
+ currentRow : any ;
82
83
currentCell : JSONValue | undefined ; //number | string;
83
84
} ) => string ;
84
85
@@ -152,6 +153,7 @@ export class ColumnComp extends ColumnInitComp {
152
153
comp . children . cellColor . reduce (
153
154
CellColorComp . changeContextDataAction ( {
154
155
currentCell : undefined ,
156
+ currentRow : { } ,
155
157
} )
156
158
)
157
159
) ;
Original file line number Diff line number Diff line change @@ -535,6 +535,7 @@ function TableCellView(props: {
535
535
} ) ;
536
536
const cellColor = cellColorFn ( {
537
537
currentCell : record [ title ] ,
538
+ currentRow : record ,
538
539
} ) ;
539
540
540
541
const style = {
@@ -627,7 +628,7 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
627
628
} ,
628
629
onCell : ( record : RecordType , rowIndex : any ) => ( {
629
630
record,
630
- title : col . titleText ,
631
+ title : String ( col . dataIndex ) ,
631
632
rowColorFn : props . rowColorFn ,
632
633
rowHeightFn : props . rowHeightFn ,
633
634
cellColorFn : cellColorFn ,
You can’t perform that action at this time.
0 commit comments