Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

[BUG] Editable table with dropdown presentation breaks with virtualization #661

Description

@mirkomiorelli

Hi there,

similar to https://community.plot.ly/t/dash-data-table-virtualization-completely-broken-with-an-editable-table/28565 (also here #583 and solved here #584 ), but now with dropdown in editable cell. An example:

app = dash.Dash(__name__, external_stylesheets=['https://codepen.io/chriddyp/pen/bWLwgP.css'])

app.layout = html.Div([
    dash_table.DataTable(
        id='table',
        columns=(
                [{'id': 'col1', 'name': 'col1', 'editable': False}] +
                [{'id': 'col2', 'name': 'col2', 'type': 'numeric', 'presentation':'dropdown'}]
        ),
        data=[
            {'col1': i, 'col2': i}
            for i in range(100)
        ],
        style_table={
            'height': 240,
            'width': 290,
            'overflowY': 'auto'
        },
        style_cell_conditional=[
            {'if': {'column_id': 'col1'},
             'width': '55%'},
            {'if': {'column_id': 'col2'},
             'width': '45%'}
        ],
        dropdown={'col2':{'options':[{'label':str(i),'value':i} for i in range(100)]}},
        editable=True,
        page_action='none',
        virtualization=True
    )
]
)

app.run_server(debug=True)

Editing the first few rows works fine. Scrolling down and editing some other row throws the following error:

Invalid argument `data` passed into DataTable with ID "table".
Expected an array.
Was supplied type `object`.

I have dash v1.4.1, dash-core-components v1.3.1, dash-renderer 1.1.2 and dash-table v4.4.1 installed and Chrome 78.0.3904.108 (Official Build) (64-bit).

Solvable bug?

Thanks for the great work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions