Skip to content

Commit 7c534bc

Browse files
committed
fix(Body/MeasureRow): fix the type error when clone ReactElement
1 parent 11266dc commit 7c534bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Body/MeasureRow.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ const MeasureRow: React.FC<MeasureRowProps> = ({
3838
const column = columns.find(col => col.key === columnKey);
3939
const rawTitle = column?.title;
4040
const titleForMeasure = React.isValidElement(rawTitle)
41-
? React.cloneElement(rawTitle, { ref: null })
41+
? React.cloneElement(
42+
rawTitle as React.ReactElement<any & React.RefAttributes<typeof rawTitle>>,
43+
{ ref: null },
44+
)
4245
: rawTitle;
4346
return (
4447
<MeasureCell

0 commit comments

Comments
 (0)