JuliaPluto / PlutoUI.jl

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

Make `Radio` return arbitrary values instead of strings #302

Open laggvar opened 3 months ago

laggvar commented 3 months ago

My intuition suggests that Radio and Select should behave identically apart from visual appearance. However, Radio only supports strings as key values. Thus,

@bind M Radio([M1 => "Diagonal Matrix", M2 => "Symmetric Matrix"])

does not work but

@bind M Select([M1 => "Diagonal Matrix", M2 => "Symmetric Matrix"])

does.

It seems this issues used to exist for Select too, but it was fixed in https://github.com/JuliaPluto/PlutoUI.jl/issues/3. Was Radio perhaps forgotten?