Option to set default table pagination
Hi,
I'm creating some tables that have plenty data in them. I have pagination enabled with the default options of
[5, 10, 25, 50, 'all']
- I'd like to keep those options, but default the view to 25 rather than 10.
Looking at CanPaginateRecords
I can see the below method, but it seems that we either show 10 rows if it's in the options array, otherwise we just use the first item. I could override the default options and change 10 to 9 or 11, but that doesn't feel right.
Is there a way that I can get round this? Or request it as a feature in a future release?
Cheers
Adam4 Replies
Solution
Perfect - not sure how I missed that! I've created a little helper that will be called on all tables and set some defaults π
Thank you.
Don't forget you can apply something to all your tables in your boot function of your provider