JuliaPluto / PlutoUI.jl

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

`MultiCheckBox` display doesn't sync #126

Open yha opened 3 years ago

yha commented 3 years ago

e.g.

using PlutoUI
##
mcb = @bind v MultiCheckBox(["a", "b", "c"])
##
mcb
##
v

Changes to the MultiCheckBox in either cell updates v, but the change is not reflected in the other MultiCheckBox.

fonsp commented 2 years ago

To fix this, we should use Object.defineProperty(container, "value", ...) instead of container.value here: https://github.com/JuliaPluto/PlutoUI.jl/blob/36c9d170f6a6ce3594f7e95bd2e2851aae3d257a/src/MultiCheckBox.jl#L173

This is done in most other PlutoUI elements, so you can take a look at those for examples: https://github.com/JuliaPluto/PlutoUI.jl/search?q=Object.defineProperty