I tried now with panel 0.10.3 but same behaviour as before.
Here is the self-contained code example again, to prevent talking past each other (:
import param
import panel as pn
pn.extension()
class Test(param.Parameterized):
value = param.Selector(default=1, objects=[1,2,3])
_updating = False
@pn.depends("value", watch=True)
def update_param(self):
# add one more number to objects
if self._updating:
return
o = self.param.value.objects
new_objects = o + [o[-1]+1]
self.param.value.objects = new_objects
self._updating = True
self.value = 2
self._updating = False
test = Test()
pn.Param(test.param["value"], widgets={'value':pn.widgets.Select}) # maybe this is the wrong usage wor a widget in this case?
Another unclear behaviour to me is, that when changing the widget value back to 2 (= the set self.value value) it doesn’t update the list.