Skip to content

docs(pagination): rephrase autoResetPageIndex behaviour#5601

Merged
KevinVandy merged 2 commits intoTanStack:mainfrom
Balastrong:patch-1
Jun 14, 2024
Merged

docs(pagination): rephrase autoResetPageIndex behaviour#5601
KevinVandy merged 2 commits intoTanStack:mainfrom
Balastrong:patch-1

Conversation

@Balastrong
Copy link
Copy Markdown
Member

Hey! I was confused by the autoResetPageIndex explanation since I noticed it wasn't working on a table with manualPagination (which is the expected behavior - all good here).

The docs mention autoResetPageIndex is true by default but I had a look at the code and if I'm not mistaken it is undefined by default.

Here is when the magic happens:

if (
table.options.autoResetAll ??
table.options.autoResetPageIndex ??
!table.options.manualPagination
) {

I rephrased that sentence in the docs removing the mention to "the flag true by default". The behaviour is active by default, but the flag isn't true otherwise manualPagination wouldn't override it in the snippet above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants