Issue
I have the interface shown in the image, and this interface contains several columns, and in the column "الاسم الثلاثي" I want to put an icon "FastBackwardOutlined" next to each name, but instead of placing an icon, I see the "[object][object]" table as shown in the image.
How can I solve the problem?
return data?.map((row: any) => {
return {
...row,
supervisoryDoctor:
row.supervisoryDoctor?.label,
trinomialName:
`${<FastBackwardOutlined />}` + row.trinomialName
};
});
Solution
You cannot put it in a string.
You could use
trinomialName: (<React.Fragment>
<FastBackwardOutlined /> {row.trinomialName}
</React.Fragment>)
Answered By - Gabriele Petrioli
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.