I am adding a new item to antd table component with pagination component and would like to navigate table contents to last or n-th page in pagination. How can I programatically navigate to the last or n-th page of antd table component with antd pagination?
How to programatically navigate to the last or n-th page of antd table component?
3.5k views Asked by vladimirp At
2
This is how I solved it:
1) Add pagination object to component state
2) Pass pagination from component state to Tables pagination prop in your components render method:
3) In your components event handler of your choice you can now use SetState to set pagination object. For example I navigate to the last page in pagination after new item is added to the table: