material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Customising PageSizeOption

Open ghost opened this issue 7 years ago • 6 comments

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.

ghost avatar Jun 03 '19 09:06 ghost

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

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

mbrn avatar Jun 05 '19 10:06 mbrn

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?

ghost avatar Jun 05 '19 10:06 ghost

Try this:

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

mbrn avatar Jun 05 '19 10:06 mbrn

Oh it worked! Thanks for the help.

ghost avatar Jun 05 '19 10:06 ghost

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

soumyaDivami avatar May 15 '20 07:05 soumyaDivami

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

KeshriAyushi22 avatar Dec 18 '20 12:12 KeshriAyushi22