Dash DataTable - Is there a way to make Filter Cell dropdowns with options as the unique values of the column?

General Question:
Is it possible to create a dropdown in a Filter Cell with options being the unique values of the column?

This is especially useful when tables get too large for a user to see what unique values are present in a given column

Hi @hibachi

Not sure what you are looking for. Do you want to filter the whole table based on the unique values in a column - similar to Excel’s auto filter? If so, that’s not possible in DataTable, but it is available in Dash AG Grid (AG Grid Enterprise licence required for this feature). You can find more info in the Set Filters section of the dash-docs. An alternate with either the DataTable or Dash AG Grid community (ie free versions) is to use an external component like a dcc.Checklist or dcc.Dropdown and filter the data in a callback before displaying in the grid.

If you are just trying to allow a user to edit a cell and limit the choices to one of the unique values in the column, then you can do that with a Dropdown in a DataTable . If you are using Dash AG Grid, you can use a Select Cell Editor or a custom component in the cells.

1 Like