icflorescu / mantine-datatable

The table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, context menus, nesting, Gmail-style batch row selection, dark theme, and more.
https://icflorescu.github.io/mantine-datatable/
MIT License
949 stars 68 forks source link

When totalRecords is undefined Pagination shows '...' #641

Closed candogusyilmaz closed 1 month ago

candogusyilmaz commented 2 months ago

Describe the bug When pagination is enabled and assigned value to totalRecords is undefined pagination component shows 1, '...', '...'.

To Reproduce Steps to reproduce the behavior:

  1. Set totalRecords to undefined at the beginning
  2. See error

Expected behavior totalRecords value might be undefined at the beginning or can be set to a defined value like query.data?.totalElements ?? 20. But it doesn't update the pagination state when query.data.totalElements is defined.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):