Skip to content

Dropdown maxHeight being overridden by something in DataTable [BUG] #2225

@lukeallpress

Description

@lukeallpress

Thank you so much for helping improve the quality of Dash!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of pip list | grep dash below
dash                      2.6.1              pyhd8ed1ab_0    conda-forge
dash-bootstrap-components 1.0.3              pyhd8ed1ab_0    conda-forge
dash-daq                  0.5.0              pyh9f0ad1d_1    conda-forge
  • if frontend related, tell us your Browser, Version and OS

    • OS: macOS 12.4
    • Browser: Chrome 105

Describe the bug

I can change the maxHeight of the dcc.Dropdown component, but as soon as a DataTable loads (even with no styling) the background of the dropdown shrinks back to 200px and any text below that is left, with a transparent background. If I return a boring Div instead of a DataTable, the dropdown stays styled correctly. Seems to be css-related, because the "incorrect styling" sticks around until I close/reopen the tab, then it's good again until a DataTable loads.

Screenshots

If applicable, add screenshots or screen recording to help explain your problem.
dropdown
Dropdown creation:
dropdown = dcc.Dropdown(options=options, placeholder='Sport', id="sport-dropdown", searchable=False, maxHeight=400, )
DataTable creation

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')
return dash_table.DataTable(df.to_dict('records'), [{"name": i, "id": i} for i in df.columns])

Metadata

Metadata

Assignees

No one assigned

    Labels

    dash-data-tablerelated to DataTable component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions