Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

'undo' does not work when actions applied to two different components consecutively #66

Closed
@rmarren1

Description

I noticed that 'undo' will not work if the previous two user interactions were applied to different components. For example, if interaction 1 is applied to component A and interaction 2 is applied to component B, then the undo button will do nothing. If both interactions are applied to the same component, then the last interaction will be undone as expected.

Reproducible example:
ezgif com-video-to-gif 1

import dash
import dash_html_components as html
import dash_core_components as dcc
from dash.dependencies import Input, Output

app = dash.Dash()
app.scripts.config.serve_locally = True

app.layout = html.Div([
    html.Button(id='click', children='click'),
    html.Div(id='output', children=''),
    dcc.RadioItems(
        id='radio',
        options=[{
            'label': 'good',
            'value': 'good'
            },
            {
            'label': 'bad',
            'value': 'bad'
            }],
        value='good')
])

@app.callback(Output('output', 'children'),
              [Input('click', 'n_clicks'),
               Input('radio', 'value')])
def crash_it(clicks, radio):
    return clicks

app.run_server(debug=True, port=8000)

Versions:

dash==0.23.1
dash-core-components==0.26.0
dash-html-components==0.11.0
dash-renderer==0.13.0

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions