[BUG] Clientside callbacks with the same input and no outputs override each other
@T4rk1n đang làm issue này rồi.
Từ ngày 4/2/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Environment
pip list | grep dash output:
dash 3.3.0
dash_ag_grid 33.3.3
dash-bootstrap-components 2.0.4
dash_cytoscape 1.0.2
- OS: Ubuntu 22.04.5
- Browser: Firefox 147.0.2
Bug description
See example code below. Clicking the button should show "one" and "two" in the developer console (I am not sure if there is a specified order in which they are expected to show up; however, I don't really mind as long as both callbacks get triggered).
However, instead only "two" is shown. It looks like the first clientside callback gets "overriden" somehow. This is not a problem when the callbacks have defined outputs.
There are some applications I have where it is useful for one component to trigger multiple clientside callbacks, so this bug does impact me (although it seems pretty straightforward to work around it).
Minimal example
#! /usr/bin/env python3
from dash import Dash, html, clientside_callback, Input
app = Dash()
app.layout = [
html.Button("click me", id="testBtn"),
]
clientside_callback(
"""
function(n_clicks) {
console.log("one");
}
""",
Input("testBtn", "n_clicks"),
prevent_initial_call=True,
)
clientside_callback(
"""
function(n_clicks) {
console.log("two");
}
""",
Input("testBtn", "n_clicks"),
prevent_initial_call=True,
)
app.run(debug=True, port=8055)
Screen capture of the bug
- Ngôn ngữ chính
- Python
- Star
- 24.4k
- Fork
- 2.3k
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 19
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/dash
-
good first issue P3 size: 1 task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
enhancement P2 size: 5
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
enhancement P3 size: 10+
-
P2 size: 1 task
-
enhancement P3 size: 1
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
canonical/paas-charm#368 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
addition to tracking list Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
StevenBlack/hosts#3256 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
qualcomm/qai-appbuilder#275 ·