react-data-table-component
react-data-table-component copied to clipboard
Common sorting and pagination for multiple tables in same page
I have 3 different tables that show a set of data based on their status, OPEN, CLOSED and PENDING. Each status is displayed in 3 different tables. I get these data from a single service call. When i sort the data in any one table service call happens and data on all 3 tables are updated. Im also updating the defaultSortFieldId and defaultSortAsc for all the tables when sort happens. But, say when I sort any one table by date, what I need is the sort icon of date from the other two tables should also change its direction to the current sort direction so that its feels like a common sort is happening in these tables.
I need this same functionality to happen when pagination takes place in any table. When I move to page 2 or change number of rows on any table the other two should also reflect this same change in their pagination controllers.