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(
6767 } )
6868 )
6969 . build ( ) ,
70- [ "currentCell" ] as const
70+ [ "currentCell" , "currentRow" ] as const
7171) ;
7272
7373// @ts -ignore
@@ -79,6 +79,7 @@ export class CellColorComp extends CellColorTempComp {
7979
8080// fixme, should be infer from RowColorComp, but withContext type incorrect
8181export type CellColorViewType = ( param : {
82+ currentRow : any ;
8283 currentCell : JSONValue | undefined ; //number | string;
8384} ) => string ;
8485
@@ -152,6 +153,7 @@ export class ColumnComp extends ColumnInitComp {
152153 comp . children . cellColor . reduce (
153154 CellColorComp . changeContextDataAction ( {
154155 currentCell : undefined ,
156+ currentRow : { } ,
155157 } )
156158 )
157159 ) ;
Original file line number Diff line number Diff line change @@ -535,6 +535,7 @@ function TableCellView(props: {
535535 } ) ;
536536 const cellColor = cellColorFn ( {
537537 currentCell : record [ title ] ,
538+ currentRow : record ,
538539 } ) ;
539540
540541 const style = {
@@ -627,7 +628,7 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
627628 } ,
628629 onCell : ( record : RecordType , rowIndex : any ) => ( {
629630 record,
630- title : col . titleText ,
631+ title : String ( col . dataIndex ) ,
631632 rowColorFn : props . rowColorFn ,
632633 rowHeightFn : props . rowHeightFn ,
633634 cellColorFn : cellColorFn ,
You can’t perform that action at this time.
0 commit comments