Skip to content
Advertisement

Dash Sort editable table, but hide sort options from users

I have a dash table. Table allows edit. I want to sort the table by column, so that if user input data, the table is resorted right away. I achieve this like on the page https://dash.plotly.com/datatable/callbacks. The sort is already set when the page loads. I got stuck on the last step, where I want to hide the sort option from user. Is that possible?

Example on the image. I want to delete the arrows marked yellow, but keep sort by column ‘pop’.

enter image description here

edited code example from https://dash.plotly.com/datatable/callbacks:

JavaScript

Advertisement

Answer

You can target the sort element and hide it using css like this:

JavaScript

So you can put that code in a css file in your assets directory for example. See the documentation here for more information about ways to include styles in a dash app.

Advertisement