TODAY learn how to bring Drag & Drop to Dash with Dashboard Engine. 🌠 Sign up for the live event!

Dash DataTable - Sort all columns by each column property, based on selected row

Hi, I have created a Dash DataTable with multiple headers.
Now i want to be able to select a row, which will then show me the same table, but now only the selected row, and re-arranged columns in ascending order based on the value in specific columns.
I could not find anything related to this type of problem within the community, and the DataTable reference page didn’t help either. Does anyone know if this is at all possible?

My DataTable looks like this:

Now, when I select on D21_X_motor_problem, I want the columns to be re-arranged such that the column with the highest value for ‘Total’ is displayed as the first column, second highest value as second column, etc.
Is there an option for this currently in the DataTable framework. Or do I need to create the data and columns properties anew based on the row that is selected, and update this to the dataframe?

Thanks in advance!

you’ll need to write a callback that updates the columns property based off of the selected rows.