Skip to content

Commit

Permalink
Merge pull request #2626 from plotly/master-2.12.1
Browse files Browse the repository at this point in the history
Master 2.12.1
  • Loading branch information
T4rk1n authored Aug 16, 2023
2 parents ee88361 + 8e29d75 commit d131833
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).


## [2.12.1] - 2023-08-16

## Fixed

- [#2625](https://github.com/plotly/dash/pull/2625) Fix background callbacks without cancel arguments failing setup, fix [#2624](https://github.com/plotly/dash/issues/2624)

## [2.12.0] - 2023-08-14

## Fixed
Expand Down
4 changes: 2 additions & 2 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,8 @@ def _setup_server(self):
long = callback.get("long")
if not long:
continue
cancel = long.pop("cancel_inputs")
if cancel:
if "cancel_inputs" in long:
cancel = long.pop("cancel_inputs")
for c in cancel:
cancels[c] = long.get("manager")

Expand Down
2 changes: 1 addition & 1 deletion dash/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.12.0"
__version__ = "2.12.1"
12 changes: 12 additions & 0 deletions tests/integration/long_callback/app_page_cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
html.Button("cancel1", id="cancel1"),
html.Div("idle", id="progress1"),
html.Div("initial", id="output1"),
html.Div("no-cancel-btn", id="no-cancel-btn"),
html.Div("no-cancel", id="no-cancel-output"),
]
),
)
Expand All @@ -51,6 +53,16 @@
)


@app.callback(
Output("no-cancel-output", "children"),
Input("no-cancel-btn", "n_clicks"),
background=True,
prevent_initial_call=True,
)
def on_click_no_cancel(_):
return "Not Canceled"


@app.callback(
Output("output1", "children"),
Input("start1", "n_clicks"),
Expand Down

0 comments on commit d131833

Please sign in to comment.