list, default pageSize

current the pageSize always default to 10, how to change that value?
kapa.ai
kapa.ai262d ago
Hi @brandonkhj. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- You can change the default pageSize value by passing the pagination.pageSize prop to the useTable hook. Here's an example:
useTable({
refineCoreProps: {
pagination: {
pageSize: 20,
},
},
});
useTable({
refineCoreProps: {
pagination: {
pageSize: 20,
},
},
});
In this example, the pageSize is set to 20 instead of the default 10. This means that 20 records will be displayed per page. Please note that the initialPageSize prop is deprecated and you should use pagination.pageSize instead. For more details, you can refer to the documentation (https://refine.dev/docs/packages/documentation/react-table/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai262d ago
<@391513391870640138> kapa.ai is still learning and improving, please let us know how it did by reacting below
adverse-sapphire
adverse-sapphire262d ago
@kapa.ai how about the useSelect pagination?
kapa.ai
kapa.ai262d ago
Let me check the knowledge base for you. One moment! :books: ---------------------- In the useSelect hook, you can set the pagination property to enable pagination. The pagination property accepts an object with current and pageSize keys. The current key represents the current page, and the pageSize key represents the number of items per page. Here's an example:
const { selectProps } = useSelect({
resource: "categories",
pagination: { current: 3, pageSize: 8 },
});
const { selectProps } = useSelect({
resource: "categories",
pagination: { current: 3, pageSize: 8 },
});
In this example, the listing will start from page 3, showing 8 records per page. Please note that pagination is disabled by default in useSelect. If you want to enable it, set the pagination.mode prop to "server".
useSelect({
pagination: {
mode: "server",
},
})
useSelect({
pagination: {
mode: "server",
},
})
For more details, you can refer to the documentation (https://refine.dev/docs/api-reference/antd/hooks/field/useCheckboxGroup/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai262d ago
<@391513391870640138> kapa.ai is still learning and improving, please let us know how it did by reacting below
More Posts
Localize datetime from Strapi dataHello, i used the tool online downloading an example for my project next.js + strapiv4+materialui I VulnerabilityDoes anyone encounters this issues when using refine? marked <=4.0.9 Severity: high Inefficient ReBring Inference autogenerated Code to my pageHello, i used the tool online downloading an example for my project next.js + strapiv4+materialui I How do i set initial value onto useSelect with its label and also value?using useSelect antdesignanyone facing White screen of death whenanyone facing White screen of death when creating a MUI with example pages using vite js?Scroll on mobile with autocompleteHello. I have a small problem when I use autocomplete, when scrolling items on mobile phones, for soDefault query result duplicates the options of select options.Previously I have asked a question regarding how to create a custom option in select input https://dAdd Type to useFormHow do I make the object that I am manipulating, with the help of useForm hook, type safe? For instFreshed downloaded boilerplate app layout messed up on refreshHi, I created and downloaded a fresh app of Next.js + AntD + Custom Auth + RestAPI. When I run it loGoogle OAuth Not WorkingHi all, I have initialised a refine project using React + Vite config, and selected Google OAuth as Trigger AutoSave inside useFieldArrayHow to make use of AutoSave feature? I have implemented table using useFieldArray but it doesn't savhello guys need helphello guys, need helpCustom url for create<Create resource="rules"/> How can i change the create url endpoint, i want api path to be differeni tried a blog post to authenticate myi tried a blog post to authenticate my next js app but i'm getting some issues like when i try routeNo List ViewHey hey -- I have an endpoint that I DO NOT want to have a list view. Is there a way to change thfrom old refine.dev project with webpack to new with the same data with viteHello everybody! If I want to upgrade my project from an older version from webpack to vite, will ev