JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

Fix CounterButton initial value #221

Closed yha closed 1 year ago

yha commented 1 year ago

Fixes a double update when a cell defining CounterButton refreshes. I also changed the tests to catch this kind of problem, but I'm not sure if that's the right fix. Pluto ignores initial_value if there is a Base.get, but the docs for initial_value seem to say it shouldn't. So maybe this should be fixed in Pluto instead?

github-actions[bot] commented 1 year ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/yha/PlutoUI.jl", rev="counter-button-init")
julia> using PlutoUI

Or run this code in your browser: Run with binder