plotly / Dash.jl

Dash for Julia - A Julia interface to the Dash ecosystem for creating analytic web applications in Julia. No JavaScript required.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document title Updating... broken?

etpinard opened this issue · comments

Consider

# main.jl
using Dash, DashHtmlComponents

external_stylesheets = ["https://codepen.io/chriddyp/pen/bWLwgP.css"]

app = dash(;external_stylesheets)

app.layout = html_div() do
    html_button("CLICK ME"; id="btn"),
    html_div(id="output")
end

callback!(app,
          Output("output", "children"),
          Input("btn", "n_clicks")) do n_clicks
    if isnothing(n_clicks)
        return ""
    end
    sleep(5)
    return "Number of clicks: $n_clicks"
end

run_server(app, "0.0.0.0", debug=true)

and the following envs:

# base
  [1b08a953] Dash v0.1.3
  [1b08a953] DashHtmlComponents v1.1.3

and

# dev
  [1b08a953] Dash v0.1.4 `https://github.com/plotly/Dash.jl.git#dev`
  [1b08a953] DashHtmlComponents v1.1.3

Then julia --project=base main.jl gives:

Peek 2021-05-05 12-02

but with julia --project=dev main.jl we get

Peek 2021-05-05 12-04

#99 seems to have caused the problem.

Things worked fine on 7b6c06b off the dev branch.

Nice catch @etpinard ! We probably need an update here due to plotly/dash#1315