[BUG] dcc.Loading stops spinning prematurely since version 3
@sergiykhan 已经在做这个了。
开始于 2026年2月4日。
评估
这个 Issue 还没有评估数据。
描述
dcc.Loading often ends spinning prematurely before the menu is rendered. The two recordings below show:
- no delay in version 2.18.2
- about half a second delay for version 3.4.0
The problem appeared since version 3.
https://github.com/user-attachments/assets/46efa559-505e-4255-9c74-fff37ff80044
https://github.com/user-attachments/assets/9e21acbd-0130-4515-b1c6-18192e4cd7c9
Dash 3.4.0
dash 3.4.0
Dash 2.18.2
dash 2.18.2
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
- OS: Windows
- Chrome 144.0.7559.110
from dash import Dash, dcc, html, dcc, Input, Output
import dash
from dash.exceptions import PreventUpdate
import time
options = [
{"label": "aa1", "value": "aa1"},
{"label": "aa2", "value": "aa2"},
{"label": "aa3", "value": "aa3"},
{"label": "best value", "value": "bb1"},
{"label": "better value", "value": "bb2"},
{"label": "bye", "value": "bb3"},
]
app = Dash(__name__)
app.layout = html.Div(
[
f"Dash Version: {dash.__version__}",
dcc.Loading(
dcc.Dropdown(id="my-dynamic-dropdown"),
type='default',
delay_show=0,
delay_hide=0,
overlay_style={
'visibility': 'visible',
},
),
],
style={'width': 200, 'marginLeft': 20, 'marginTop': 20},
)
@app.callback(
Output("my-dynamic-dropdown", "options"),
Input("my-dynamic-dropdown", "search_value")
)
def update_options(search_value):
if not search_value:
raise PreventUpdate
time.sleep(1.0)
return [o for o in options if search_value in o["label"]]
if __name__ == "__main__":
app.run(debug=True, port=5000)
- 主要语言
- Python
- 星标
- 24.4k
- 派生
- 2.3k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 19
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
plotly/dash 的其他 Issue
-
good first issue P3 size: 1 task
难度 2/5 1-3 小时 新手友好度 68/100
-
enhancement P2 size: 5
难度 5/5 一周以上 新手友好度 45/100
-
enhancement P3 size: 10+
-
P2 size: 1 task
-
enhancement P3 size: 1
难度 3/5 1-2 天 新手友好度 72/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/skills#1811 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·