React-table: nextPage and goToPage don't work well

Created on 14 May 2020  路  4Comments  路  Source: tannerlinsley/react-table

Hello,

i have done npm update and when i done it, i got the new version of react-table. but in doing so, nextPage and goToPage in manualPagination don't work anymore so i come back to v7 and it work well.

I try with 7.0.4 and it works too.

Thanks

Most helpful comment

It looks like the goToPage function used to work when used in conjunction with manualPagination mode without a pageCount specified, but that appears to be removed in v7.1.0. The pageCount property is now required, as explained in the docs: Table Options > pageCount.

The pagination-controlled example app provides some sample code you can reference.

All 4 comments

yes,I have the same problem. goToPage breaks when upgrading to 7.1.0, but works well on 7.0.4

This makes me wonder if there are tests in place making sure things don't break, since it's quite an essential functionality

It looks like the goToPage function used to work when used in conjunction with manualPagination mode without a pageCount specified, but that appears to be removed in v7.1.0. The pageCount property is now required, as explained in the docs: Table Options > pageCount.

The pagination-controlled example app provides some sample code you can reference.

I came across this trying to figure out why nextPage would only fire every other time i tried to fire it. turns out that pageCount should _only_ be defined if you are doing manualPagination. at least that fixed my issue client side pagination being a little wonky

This should be fixed in the latest version with a few commits going towards pagination fixes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeonHex picture LeonHex  路  3Comments

missmellyg85 picture missmellyg85  路  3Comments

mlajszczak picture mlajszczak  路  3Comments

tremby picture tremby  路  3Comments

ocalde picture ocalde  路  3Comments