Closed jsebrech closed 5 years ago
When you have a lot of pages and you pass currentPage >= 5 as a string, the pagination renders with far too many number buttons.
The bug is introduced on this line: https://github.com/digipolisantwerp/acpaas-ui_angular/blob/master/packages/pagination/lib/src/pagination/components/pagination/pagination.component.ts#L69
When currentPage is a string, the slice command ends up converting to at least "5" + 1, or page 51.
The application that renders the aui-pagination can pass currentPage as a number instead of a string. The bug does not occur in that case.
Fixed by #145
Describe the bug
When you have a lot of pages and you pass currentPage >= 5 as a string, the pagination renders with far too many number buttons.
The bug is introduced on this line: https://github.com/digipolisantwerp/acpaas-ui_angular/blob/master/packages/pagination/lib/src/pagination/components/pagination/pagination.component.ts#L69
When currentPage is a string, the slice command ends up converting to at least "5" + 1, or page 51.
Workaround
The application that renders the aui-pagination can pass currentPage as a number instead of a string. The bug does not occur in that case.
Screenshots