Table data State not reflecting users modification

The table data that I got from a callback is always sorted in the default way and doesn’t reflect the new sort if the user sorted it differently from the GUI. Which means that using the active cell to get the data will always be related to the initial table order.
Is there a way to get the table data reflecting any change that the user did (Especially in terms of sorting)

@app.callback(
[Output(‘inception-bkt-vega-scatter-id’, ‘children’)]
[Input(‘trade-inception-vega-table-id’, ‘active_cell’)],
[State(‘trade-inception-vega-table-id’,‘data’)]
)
def updateInceptionBktVegaScatter(active_cell, data):
row = active_cell[“row”]
col = active_cell[“column”]
col_id = active_cell[“column_id”]
cellData = data[row][col_id] # CellDATA is always corresponding the active cell from the initial table order

Hi @nero

Check out the DataTable Reference docs for the derived_*_* props for example:

derived_virtual_data ( list of dicts ; optional): This property represents the visible state of data across all pages after the front-end sorting and filtering as been applied.

Or if you are just using the active_cell prop to trigger the callback, and you have a large dataset - you might get better performance by using:

derived_viewport_data ( list of dicts ; optional): This property represents the current state of data on the current page. This property will be updated on paging, sorting, and filtering.

``

Thank you, it works perfectly