The tooltip appears in the incorrect position after sorting the table. I ran a quick test using a snippet from DataTable Tooltips | Dash for Python Documentation | Plotly, and just added sort_action="native". How can this be resolved? Or any suggestions/workarounds?
Hi, I encountered that thread as well, thanks. Is it possible to get the state of the table even after sorting? It seems that State('table', 'data') returns only the original table/dictionary; and State('table', 'sort_by') returns only the column and sorting method information. Is it possible to get back a state or dictionary with the order of the sorted table?
To get the state of the table after sorting, try these props:
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.
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.
Plus there are also derived_viewport_* amd derived_virtual_* props for indices, row_ids, selected_columns, selected rows and selected_row_ids. See more information in the Reference
Thanks! Right, so my idea was to get the sorted table data back and put it back to tooltip_data=[] with the updated (sorted) order. I have printed out the array and it looks correct, but it does not seem to work. Here’s what I tried.