Managing react state on table cells and header

Hi team, I'm developing a server side render table with row selection.

I have a problem, in my current page imagine I have 10 elements, so I have a button to select all rows in the table, this 10 and rest ones

So when I try to use table getIsAllRowsSelected() method return true always when I select current page but this is not real because I have manual pagination and server side rendering for my data.

In this way I would like to use react useState to manage this select all rows and not depend from the table method because is not real.

My problem is that I try to read this react state dinamically inside cell render method or header in columns and state is not updated.


So I can not check this getIsAllRowsSelected() as a real use case and neither react state.

Does anyone can help me with that?

I can explain this better with code.

Thank you so much
Was this page helpful?