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
Describe the bug
The enablePageInput property of <PaginationNav> is supposed to display a box that lets the user navigate to an arbitrary page in a paginated portion of the UI. It looks like this.
This property isn't used in the UI at the moment, but I'd like to use it. The enablePageInput property doesn't work because it just changes the apparently selected page without invoking the callback function passed in from the UI, which is what's used to alter what is displayed on the page (see video).
The root cause is the onInputButtonClick function. When the 'go' button associated with enablePageInput is clicked, the component runs setActivePage(inputPage). The changes the highlighted page to the newly selected page, but doesn't cause the other intended effects in the UI. It needs to be doing the same thing that the moveToPage function does - invoke onChange so that the associated UI callback is run.
To Reproduce
Steps to reproduce the behavior:
Go to any page using pagination (e.g., Load Data / API Tokens)
Change the enablePageInput property of that PaginationNav to true
Enter or click a new number
The 'selected' page changes, but items do not re-render because the component doesn't call the onChange function.
Expected behavior
Hitting 'Go' in pagination nav should take the user to a different page of paginated items.
Screenshots
Pagination nav does change pages when user clicks arrows or pagination numbers
Screen.Recording.2022-10-27.at.3.37.39.PM.mov
Pagination nav does not change pages when user hits 'go' given a page number
Screen.Recording.2022-10-27.at.3.37.57.PM.mov
The text was updated successfully, but these errors were encountered:
Describe the bug
The
enablePageInput
property of<PaginationNav>
is supposed to display a box that lets the user navigate to an arbitrary page in a paginated portion of the UI. It looks like this.This property isn't used in the UI at the moment, but I'd like to use it. The
enablePageInput
property doesn't work because it just changes the apparently selected page without invoking the callback function passed in from the UI, which is what's used to alter what is displayed on the page (see video).The root cause is the
onInputButtonClick
function. When the 'go' button associated withenablePageInput
is clicked, the component runssetActivePage(inputPage)
. The changes the highlighted page to the newly selected page, but doesn't cause the other intended effects in the UI. It needs to be doing the same thing that themoveToPage
function does - invokeonChange
so that the associated UI callback is run.To Reproduce
Steps to reproduce the behavior:
enablePageInput
property of thatPaginationNav
totrue
onChange
function.Expected behavior
Hitting 'Go' in pagination nav should take the user to a different page of paginated items.
Screenshots
Pagination nav does change pages when user clicks arrows or pagination numbers
Screen.Recording.2022-10-27.at.3.37.39.PM.mov
Pagination nav does not change pages when user hits 'go' given a page number
Screen.Recording.2022-10-27.at.3.37.57.PM.mov
The text was updated successfully, but these errors were encountered: