Skip to content

[BUG] Error caused by returning a single no_update for multiple Outputs in the client-side callback #3366

@CNFeffery

Description

@CNFeffery
dash                 3.1.1

For client-side callbacks, if for multiple Outputs, a single no_update is returned uniformly as in the previous version, an Invalid array length error will be triggered. The following is a case to reproduce the problem:

import dash
from dash import html
from dash.dependencies import Input, Output

app = dash.Dash(__name__)

app.layout = html.Div(
    [
        html.Button('test', id='test-input'),
        html.Div('block1', id='test-output1'),
        html.Div('block2', id='test-output2'),
    ],
    style={'padding': 50},
)

app.clientside_callback(
    """(n_clicks) => {
        return window.dash_clientside.no_update;
    }""",
    Output('test-output1', 'children'),
    Output('test-output2', 'children'),
    Input('test-input', 'n_clicks'),
)

if __name__ == '__main__':
    app.run(debug=True)
Image

Metadata

Metadata

Assignees

Labels

P1needed for current cyclebugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions