question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v7-alpha.21] Pagination does not work with grouping

See original GitHub issue

First of all, thank you so much for your work - it is awesome!

Bug description I noticed a bug when trying to use useGroupBy, useExpanded and usePagination hooks: as soon as the grouping is activated (either manually by the user, or programmatically, using default table state), the component runs into an infinite re-rendering cycle. Meaning that it starts re-rendering every several milliseconds without any reason. Also, pagination stops working.

To reproduce To reproduce it, I slightly modified your original example of grouping:

  1. Go to https://codesandbox.io/s/tannerlinsleyreact-table-grouping-zrmbi
  2. Open the console: you’ll see there’s only one “rendering…” message logged from the component, which is as expected
  3. Now click on any column to group by it
  4. You’ll notice infinitely many “rendering…” messages appearing in the console
  5. Try clicking on “next page” button: pagination doesn’t work
  6. If you disable grouping of that column, everything works fine again
  7. If you remove usePagination hook and adjust the component to use rows instance property instead of page, grouping works fine without infinite re-rendering

Expected behavior Obviously, no infinite rendering and working pagination.

Additional context I also noticed that nestExpandedRows table option doesn’t have any effect. Either it is true or false, when you expand the last row in the grouped table, nested values are paginated and thus are not displayed. Maybe it’s a separate bug, or maybe it’s related.

I could live with this issue by simply disabling pagination when using grouping. But in my own code, I use a common Table component where I need to provide both functionalities for the outer components. And it seems there is no way to disable pagination with table options, is there? As a side note, it would be nice to have such an option

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
tannerlinsleycommented, Aug 19, 2019
3reactions
tannerlinsleycommented, Aug 15, 2019

It’ll be fixed soon. Hang tight.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v7-alpha.21] Pagination does not work with grouping #1440
I noticed a bug when trying to use useGroupBy , useExpanded and usePagination hooks: as soon as the grouping is activated (either manually...
Read more >
Pagination does not work as expected when "Group By" is ...
Pagination does not work as expected when "Group By" is applied on any List Column and number of items exceeds the Show x...
Read more >
Vuetify data table grouping with paging not working as expected
It doesn't appear the Vuetify data table grouping handles the paging correctly when group headers are collapsed.
Read more >
Grouped List View won't paginate properly
In the Library, this works as expected - each page has 3 groups, and any group with more than 10 items has its...
Read more >
Confluence Server - Pagination not working for group endpoint.
Hi navendu,. It sounds like you might have the "limit" parameter when using the Confluence API to query for your Groups, however I'd...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found