Change the default number of rows in griddle

358 Views Asked by At

I'm trying to change the default number of rows displaying in the griddle. Does anybody know how to do it? Thanks!

2

There are 2 best solutions below

0
theptrk On

It should definitely be made into a pull request for added functionality, but the line that sets the default is [https://github.com/GriddleGriddle/Griddle/blob/master/scripts/griddle.jsx#L37] and you could change it manually.

0
solanki... On

This is simple. Just use "resultsPerPage" property in Griddle Tag. In the following below I display 3 rows only instead of 5 default rows per page.

<Griddle resultsPerPage={3} results={fakeData}/>