sematable
sematable copied to clipboard
how can I specify a default page size of 'All'?
I've been asked to have my table display All of the elements by default, while still offering the 'page size' menu for those users who prefer to select a given page size. Is this supported? In my (old) build of sematable - version 1.4.4- I noticed that if I select a default page size that is, for example, 999 (something really long), then the page size displays incorrectly (it says '5' of -whatever the actual size is-). Is there any way to get this behavior to work in the current version? (that is, either specifying directly that the size should be 'All', or specifying a large enough value to simulate this). Thanks in advance! (and thanks for providing this very useful component!)
Hi @pgoldweic. Can you please try using -1 (https://github.com/sematext/sematable/blob/master/src/PageSize.js#L16) as the default page size when configuring your sematable?
We should probably export this constant from sematable though so you can use it instead of hard coding -1.
Thanks for your response! Sure, can try this out (yes, it would definitely be nice for you to export the variable in the future). Should I also assume this will only work with the current version of sematable? Or do you think there's a chance it will also work with 1.4.4? Thanks in advance.
It should work with 1.4.4. as well.
That's great! Thanks again.