panel
panel copied to clipboard
from_param returns a sub-object expand button
ALL software version info
panel 0.13.1 / param 1.12.0 / bokeh 2.4.3 / Python 3.8 / Windows 10
Description of expected behavior and the observed behavior
Using the from_param method on a widget that supports objects results in an undesired expand sub-object button.
If the same syntax is used on a list of objects that are not Parameterized, the button is not shown.
Expected: the sub-object button is not shown (expand_button=False
).
Alternate could be allowing the expand_button
kw_arg to be set from the from_param
method.
Complete, minimal, self-contained example code that reproduces the issue
import panel
import param
class A(param.Parameterized):
number = param.Number()
class B:
pass
a = A()
b = B()
class C(param.Parameterized):
selection = param.Selector(objects=[a])
class D(param.Parameterized):
selection = param.Selector(objects=[b])
c = C()
d = D()
panel.extension()
app = panel.Column(
panel.widgets.RadioButtonGroup.from_param(c.param.selection),
panel.widgets.RadioButtonGroup.from_param(d.param.selection))
app.show()