You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use this code: dashboard/starter-example/app/ui/invoices/pagination.tsx
when the number of pages is more than 7, the error 'duplicated mapping key' will appear. Because, under certain conditions, the generatePagination function returns an array in which there may be identical elements "...", which are then used as a key.
Also, it would be worth adding two more conditions to the generatePagination function, when the current page = 3 and the current page = total pages - 2:
This option removes the problem of the lack of a button to page 4 when page 3 is active and the same effect at the end, and also makes the pagination always the same length of 7 cells.
The text was updated successfully, but these errors were encountered:
If you use this code:
dashboard/starter-example/app/ui/invoices/pagination.tsx
when the number of pages is more than 7, the error 'duplicated mapping key' will appear. Because, under certain conditions, the generatePagination function returns an array in which there may be identical elements "...", which are then used as a key.
Also, it would be worth adding two more conditions to the generatePagination function, when the current page = 3 and the current page = total pages - 2:
This option removes the problem of the lack of a button to page 4 when page 3 is active and the same effect at the end, and also makes the pagination always the same length of 7 cells.
The text was updated successfully, but these errors were encountered: