table props

How to disable pagination in table props?
2 Replies
kapa.ai
kapa.ai4mo ago
Hi @Sly. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To disable pagination in the tableProps of a <Table> component when using the useTable hook in refine, you can set the pagination.mode to "off". This will disable pagination and fetch all records. Here is an example of how to do this:
import { useTable } from "@refinedev/core";

const { tableProps } = useTable({
pagination: {
mode: "off",
},
});

<Table {...tableProps} pagination={undefined} rowKey="id">
<Table.Column title="Title" dataIndex="title" />
</Table>
import { useTable } from "@refinedev/core";

const { tableProps } = useTable({
pagination: {
mode: "off",
},
});

<Table {...tableProps} pagination={undefined} rowKey="id">
<Table.Column title="Title" dataIndex="title" />
</Table>
In this example: - The pagination.mode is set to "off" in the useTable hook configuration. - The pagination prop of the <Table> component is set to undefined to ensure that Ant Design's pagination is completely disabled. For more details, you can refer to the pagination.mode documentation (https://refine.dev/docs/ui-integrations/ant-design/hooks/use-table/#paginationmode). If you have any further questions, feel free to ask! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@1172098337760096258> kapa.ai is still learning and improving, please let us know how it did by reacting below