progressive-amaranthP
Refine2y ago
16 replies
progressive-amaranth

Ant design table

export default function PostList() {
    const { tableProps } = useTable<Course>()

    return (
        <Table {...tableProps} rowKey="id">
            <Table.Column dataIndex="id" title="ID" />
            <Table.Column dataIndex="title" title="Title" />
            <Table.Column dataIndex="imageSrc" title="Image" />
        </Table>
    )
}


How can I make each row of the table link on click to another route? For example, instead of clicking on an edit button, I want the user to be able to edit an item by clicking on its row.
Was this page helpful?