Ghostly Blue Button on ListSelector when list contains parameterized objects

I don’t know what the greyed out blue button is, nothing happens when I click on it. How can I access and control the blue button functions?

import panel as pn
import param as pm


class A(pm.Parameterized):
    a = pm.Integer(default=0)


a = A()
b = A()


class MyParameterizedClass(pm.Parameterized):
    # A ListSelector parameter, which will be represented by a CrossSelector in the UI
    my_options = pm.ListSelector(
        default=[],
        objects=[a, b],
    )


# Create an instance of your parameterized class
my_class_instance = MyParameterizedClass()

# Automatically create a UI for the parameters
param_panel = pn.Param(my_class_instance.param)

# Display the panel
param_panel.servable()

The button isn’t clickable regardless of what items are selected.

image

I find ListSelector to be generally under documented.

It’s briefly mentioned in the following:

Which finally leads to:

But I don’t see any documentation about the blue button functionality.

Thanks!

I tried displaying with controls, which is cool, but they don’t address the blue button. They also look different than they do in the docs here: MultiSelect — Panel v1.3.4

Displaying controls:

pn.Row(param_panel.controls(jslink=True), param_panel).servable()

No help with mysterious blue button:

OK, making progress. I found documentation addressing the blue button here: Create nested UIs — Panel v1.3.4

Updated my code to be:

import panel as pn
import param as pm


class A(pm.Parameterized):
    a = pm.Integer(default=0)


a = A()
b = A()


class MultiSelect(pm.Parameterized):
    # A ListSelector parameter, which will be represented by a CrossSelector in the UI
    options = pm.ListSelector(
        default=[],
        objects=[a, b],
    )


# Create an instance of your parameterized class
multi_select = MultiSelect()

# Automatically create a UI for the parameters
param_panel = pn.Column(
    pn.panel(multi_select.param, expand_button=True, expand=True, expand_layout=pn.Column())
)

# Display the panel
param_panel.servable()

Notice expand_button=True, expand=True, expand_layout=pn.Column(). But even with these parameters, there is no expansion happening. It seems that the expand functionality is disabled on ListSelector. I wonder if there are plans to implement that…? Anybody know?

Meanwhile, to disable ghostly blue button:

param_panel = pn.Column(
    pn.panel(multi_select.param, expand_button=False)
)