Suppose my code looks as follows:
import panel as pn
select = pn.widgets.Select(options=[1, 2, 3, 4, 5, 6])
button = pn.widgets.Button(name='OK')
def activity1(button):
# do something
return result
myObject = pn.bind(activity1, button=button)
pn.serve(pn.Column(select, button, myObject))
I now want to introduce a second function, activity2
that also changes myObject
. What would be the recommended way of doing this? Should I bind myObject
again, such that in total I have two functions corresponding to it? Or should I adjust the function activity1
such that it also takes input from the second button?