Pagination buttons (like prev/next) can become any HTML element, for example <a>, which, unlike <button>, doesn't support disabled attribute and still emits click events.
If a pagination button component is considered disabled, but rendered as a non-button HTML element, clicking it may update the component's state in a bad way (for example, set the current page to 0 after clicking the "<" button when being on the first page).
This PR adds !disabled && conditions to all pagination buttons components' click event handlers.
Pagination buttons (like prev/next) can become any HTML element, for example
<a>
, which, unlike<button>
, doesn't supportdisabled
attribute and still emitsclick
events.If a pagination button component is considered disabled, but rendered as a non-button HTML element, clicking it may update the component's state in a bad way (for example, set the current page to 0 after clicking the "<" button when being on the first page).
This PR adds
!disabled &&
conditions to all pagination buttons components'click
event handlers.