How to stop auto reload of React Table ?
Hi ,
I am using server side data through react table , I am able to get data and go to different pages ,
According to one use case I need to navigate User to detail page on click of row on table where we show a form so that User can edit data , I have been able to do that as well , however if User comes back from detail page without doing any modifications via "BACK" button on detail page , Table is always reloading and coming back to 1st page
Please help , I don't want React table to reload , when we come back or navigate back from detail page without updating data
Thanks , Vaibhav Mittal
To stop a table from rerendering, you must make sure that you are not passing new props to it. If new data objects are passed to the table, it will rerender. Remember, just because you pass the same general data doesn't mean it's the same object. You have to pass the exact same reference to the same object for it to be considered the same using Object.is / ===
Hi Tanner, thanks for replying ,i tried to infer what you mean , table is not reloading now , I added some fixes to my code, however there is some thing strange happening , I am getting back to correct page but somehow surprisingly page number is always 1 eventhough I left from someother page , in GUI , and its not correctly updating in GUI , I mean if I left from page number 2 , on return page is correct in GUI but page number is appearing as 1
I am attaching code for your reference , Please have a look and kindly suggest GestioneKOSospesi.zip
GestioneKOSospesi is file name ,