Closed matsunotsuma closed 2 months ago
Hi, I want to render various button depending on row data. So I wrote this code.
const columns = [ /*...*/ { ...keyColumn("action", { component: ({ rowData }) => { if (rowData.defaultUser) { return null; } else if (rowData.status === "active") { return <Button>削除</Button>; } else if (rowData.status === "inactive") { return <Button>追加</Button>; } console.log("rowData", rowData); return <Button>test</Button>; }, }), title: "", },]
But this code doesn't work because "rowData" is undefined. Why undefined?
Best regards.
i found that "rowData" contains only target column data.
Hi, I want to render various button depending on row data. So I wrote this code.
But this code doesn't work because "rowData" is undefined. Why undefined?
Best regards.