Datatable - Dropdown - Change style

Hi,

I would like to change the style (color and size) of my datatable dropdown values (Dropdowns Inside DataTable | Dash for Python Documentation | Plotly). The values that are shown when clicking on the dropdown arrow are in pink by default but I could not manage to change this…

Could someone please show me an example on how to do this?

Thanks!

Hi @dash_noob

Try adding this to the css in the assets folder:


.dash-spreadsheet .Select-option {
    color: black !important;
}

or by using the css prop in the table

        dash_table.DataTable(
            id="table-dropdown",
            data=df.to_dict("records"),
            css=[
                {
                    "selector": ".dash-spreadsheet .Select-option",
                    "rule": "color: black",
                },
            ],
          .....
3 Likes

Thanks for the quick reply! It works :slight_smile:

1 Like