Structure of the Table State object
mainThe table state is a structured object used to track the current configuration of the data table, including pagination, searching, sorting, and filtering. This state can be used to synchronize the UI with backend API requests.
Key properties include:
currentPage: The current active page number.rowsPerPage: The number of rows to display per page.offset: The starting index for the current view (calculated as(currentPage - 1) * rowsPerPage).search: The full-text search string.sort: An object containing thefieldbeing sorted and thedirection(ascordesc).filters: An array of objects, where each object contains afieldand avalueto filter by.
state = {
currentPage: 3,
rowsPerPage: 10,
offset: 20,
search: 'michel',
sort: { field: 'age', direction: 'desc' },
filters: [ { field: 'city', value: 'limoge' } ]
}