Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06b5caf

Browse files
fix: currentCell is undefined in conditional cell color field
1 parent0a18b11 commit06b5caf

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const CellColorTempComp = withContext(
6767
})
6868
)
6969
.build(),
70-
["currentCell"]asconst
70+
["currentCell","currentRow"]asconst
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
8181
exporttypeCellColorViewType=(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
);

‎client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ function TableCellView(props: {
535535
});
536536
constcellColor=cellColorFn({
537537
currentCell:record[title],
538+
currentRow:record,
538539
});
539540

540541
conststyle={
@@ -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,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp