Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DataTable updates #158

Merged
merged 4 commits into from
Nov 9, 2021
Merged

DataTable updates #158

merged 4 commits into from
Nov 9, 2021

Conversation

dgading
Copy link
Member

@dgading dgading commented Nov 2, 2021

This PR adds some missing loading and no result features to the DataTable and DataTableResults section.

The DataTable gets 2 additional props and uses the loading state to show/hide the rows. The additional props allow for new components to be passed through to replace the default loading/no results jsx.

For the DataTablePageResults components there are two fixes:

  1. When on the last page of a dataset results, the limit was always applied to the offset, which could result in the display showing 11-20 out of 17. It will now show the total results if limit + offset is greater than total.
  2. When no total is passed, it will return 0-0 of 0 rows instead of 1-0 of 0 rows.

@dgading dgading merged commit c96ecd0 into 2.x Nov 9, 2021
@dgading dgading deleted the table-loading-states branch November 9, 2021 15:55
dgading added a commit that referenced this pull request May 18, 2022
* Fix results from showing 1-0 and to many on last page of table
* Add custom loading/no results props to datatable
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant