table icon indicating copy to clipboard operation
table copied to clipboard

Pagination returns to initial index when data updated

Open autherity opened this issue 5 years ago • 1 comments

so I am have a function inside a useEffect hooks

  useEffect(() => {
    getData('post')
  }, [data])

and this is my table component

<DataTable columns={column} data={data} />

since data is alawys being updated my pagination would not let me pass to the second page and it always returns me to pageIndex 0.

autherity avatar Apr 15 '21 17:04 autherity

solution is found in this link.

closing this

autherity avatar Apr 16 '21 12:04 autherity