dash-tabulator
dash-tabulator copied to clipboard
Is there a property that returns the current sorting of rows?
It seems the data property returned from the callback is independent of the current sorting. I am interested in that ordering and would like to store the data in the current order. This is my current callback.
@app.callback(
Output({"index": "pkl-save-output", "type": "output"}, "children"),
Input("pkl-save", "n_clicks"),
Input("pkl-table", "data"),
Input("pkl-table", "dataChanged"),
State("wdir", "children"),
)
def plk_save(n_clicks, data, data_changed, wdir):
df = pd.DataFrame(data)
if len(df) == 0:
df = pd.DataFrame(columns=TARGETS_COLUMNS)
T.write_targets(df, wdir)
return dbc.Alert("Target list saved.", color="success")
I tried replacing
Input("pkl-table", "data"),
with
Input("pkl-table", "dataSorted"),
but that does not change anything.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.