Hi,
I want to disable a visual based on its param definition as is shown in the example below.
import panel as pn
import param
pn.extension("bokeh")
class SimpleExample(param.Parameterized):
update_plot = param.Action(label="UPDATE PLOT", doc="Update the plot")
def __init__(self, **params):
super().__init__(**params)
self.update_plot = self._update_plot
self.button = pn.Param(
self.param.update_plot,
widgets={"update_plot": {"button_type": "primary"}},
)
self.panels = [
self.button]
self.button.visible=False
self.main = pn.Column(*self.panels)
def _update_plot(self, *_):
time.sleep(3)
app = SimpleExample(name="simple")
app.main.servable()
I think the code is working properly, but I cannot find the attribute that allows me to set visible to false since I am currently setting it to the param object.
Any idea what I am doing wrong ?