useList pageSize defaults to 10
useList pageSize defaults to 10 how can the default pagigation value be changed across the hooks can it be set in the config
pageSize can be changed across various hooks in refine. Here are the steps to change the default pageSize for different hooks:useList HookpageSize in the useList hook, you can pass the pageSize property to the pagination object.useTable HookuseTable hook, you can also set the pageSize in the pagination object.useSimpleList HookuseSimpleList hook, you can set the pageSize in the pagination object.useTable with Ant Design IntegrationuseTable hook with Ant Design integration, you can set the pageSize in the pagination object as well.useTable with Tanstack Table IntegrationuseTable hook with Tanstack Table integration, you can set the pageSize in the pagination object within refineCoreProps.pageSize property in the pagination object for each hook, you can change the default pagination value as needed.<Refine> component. This way, the default pageSize will be applied across all hooks that use pagination.<Refine> component:pageSize is set to 20 across all hooks that use pagination, unless overridden locally.pagination property in the options of the <Refine> component, you can globally configure the default pagination settings for your application.pagination property is not directly available in the IRefineOptions type for the <Refine> component. Therefore, setting the default pagination globally in the refine config is not supported directly.pageSize for each hook individually as shown in the previous examples. Here are the examples again for setting the pageSize in different hooks:useList HookuseTable HookuseSimpleList HookuseTable with Ant Design IntegrationuseTable with Tanstack Table Integration<Refine> component itself. You will need to set the pageSize individually for each hook where pagination is used.IRefineOptionsuseList({
pagination: {
pageSize: 20,
},
}); import { useTable } from "@refinedev/core";
useTable({
pagination: {
pageSize: 20,
},
}); useSimpleList({
pagination: {
pageSize: 20,
},
}); useTable({
pagination: {
pageSize: 20,
},
}); useTable({
refineCoreProps: {
pagination: {
pageSize: 10,
},
},
}); import { Refine } from "@refinedev/core";
const App = () => {
return (
<Refine
options={{
pagination: {
pageSize: 20, // Set your desired default page size here
},
}}
// other props
/>
);
};
export default App;useList({
pagination: {
pageSize: 20,
},
});import { useTable } from "@refinedev/core";
useTable({
pagination: {
pageSize: 20,
},
});useSimpleList({
pagination: {
pageSize: 20,
},
});useTable({
pagination: {
pageSize: 20,
},
});useTable({
refineCoreProps: {
pagination: {
pageSize: 10,
},
},
});