-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Names of Parameterized options not used as labels of Selectors #3688
Comments
Even if it worked before, I'm not sure it should actually have, as I find this usage as shown in the example pretty confusing. Do you have a more specific use case in mind that would motivate supporting that? |
I can't think of any mechanism that would have allowed this to work in the past tbh. I'm -0 on supporting this, I think it's not unreasonable to support but it seems of very limited utility. The |
Also just tested all Panel versions in the 0.11.x, 0.12.x series as well as 0.13.0 and this has never worked as far as I can tell. Therefore I'm going to close as invalid. |
The reason why I also think this is wrong is that the |
Was this maybe the intent of the original post? import panel as pn
pn.extension()
component1=pn.panel("Value1", name="V1")
component2=pn.panel("Value2", name="V2")
selection = pn.widgets.RadioBoxGroup(value=component1, options=[component1, component2])
pn.Column(
selection
).servable() In that case I would have expected |
I don't know if using |
Sure, but it's worth checking if it used to work this way... |
I've checked panel==0.10.0/ param==1.9.3 with this example import param
import panel as pn
class MyClass(param.Parameterized):
value = param.Number()
options = [
MyClass(name="obj1"), MyClass(name="obj2")
]
pn.widgets.Select(options=options).servable() It does not work. I simply don't understand it. In my head I've used that so many times :-) I would still argue it is very valuable to support and very much in line with how the Parameter Subobjects example works for parameterized classes and how Parameter Subobjectsimport param
import panel as pn
options = [pn.panel("Value1", name="value1"), pn.panel("Value2", name="value2")]
class MyOptionsClass(param.Parameterized):
value = param.Selector(objects=options)
my_options = MyOptionsClass()
pn.Param(my_options, widgets={"value": pn.widgets.RadioBoxGroup}, expand_button=False).servable() Tabsimport panel as pn
options = [pn.panel("Value1", name="value1"), pn.panel("Value2", name="value2")]
pn.Tabs(*options).servable() |
Wait, that example is very different from the example you had posted originally. I fully agree that the |
I'm using the other examples because I believe they are all should behave similar using the I guess I thought the widgets would use the |
Ah, ok. You confused us all with an apparently actual issue with an accurate issue title but the wrong code snippet. :-) I too think it used to say |
Panel 0.13.1
shows
I would expect "Value1" and "Value2" to be shown as labels. It used to be like that and it was simple and powerful.
The text was updated successfully, but these errors were encountered: