From Dash Documentation & User Guide | Plotly
id
is a special hidden column that can be used as an alternative torow_index
for highlighting data by index. Since each row has a uniqueid
, the conditional formatting associated with thisid
will remain associated with that data after sorting and filtering.
This would make things so much simpler, but when I tried to use “id” as an alternative to “row_index” it failed with this message:
Failed component prop type: Invalid component prop `style_data_conditional[0].if` key `id` supplied to DataTable.
Bad object: {
"column_id": "X13",
"id": "S000000"
}
Valid keys: [
"column_id",
"column_type",
"filter_query",
"state",
"row_index",
"column_editable"
]
My table does have a column with ‘id’ as the key. How do I use conditional styles based on the row id rather than the row index?