Material-table: Customising PageSizeOption

Created on 3 Jun 2019  路  6Comments  路  Source: mbrn/material-table

Is there any way to load all of the data, irrespective of the page size? I mean, I want no page size on the table and load all of the data.

help wanted

Most helpful comment

Try this:

options={{
pageSize: 50,
pageSizeOptions: [50, 100, 200]
}}
/>

All 6 comments

just give array of your data to data field of component:

https://material-table.com/#/docs/features/search

I didn't understand. I am talking about the page size that comes on the table pagination toolbar which is by default 5, I don't want that. If for example I have 50 rows of data then it should load all of it rather than just 5 (Default Page Size). How would I do that?

Try this:

options={{
pageSize: 50,
pageSizeOptions: [50, 100, 200]
}}
/>

Oh it worked! Thanks for the help.

Hey, can somebody help me as to how can I get the current page and set the same?

can anybody tell how to set the current selected pagesize from the array ? and then use that page size on every reload irrespective of going back to the default value

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlgreene2 picture jlgreene2  路  3Comments

ModPhoenix picture ModPhoenix  路  3Comments

VipinJoshi picture VipinJoshi  路  3Comments

Likurg2010 picture Likurg2010  路  3Comments

KKrisu picture KKrisu  路  3Comments