Skip to content

Commit 1c65a19

Browse files
authored
Ensure .from_param works with Action parameter (#8079)
1 parent 91467a3 commit 1c65a19

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

panel/param.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -612,18 +612,14 @@ def link(change, watchers=[watcher]):
612612
updates['step'] = p_obj.step
613613
elif change.what == 'label':
614614
updates['name'] = p_obj.label
615-
elif p_key in updating:
616-
return
617-
elif hasattr(param, 'Event') and isinstance(p_obj, param.Event):
615+
elif p_key in updating or isinstance(p_obj, param.Event):
618616
return
619617
elif isinstance(p_obj, param.Action):
620618
prev_watcher = watchers[0]
621619
widget.param.unwatch(prev_watcher)
622620
def action(event):
623621
change.new(parameterized)
624622
watchers[0] = widget.param.watch(action, 'clicks')
625-
idx = self_or_cls._internal_callbacks.index(prev_watcher)
626-
self_or_cls._internal_callbacks[idx] = watchers[0]
627623
return
628624
elif throttled and hasattr(widget, 'value_throttled'):
629625
updates['value_throttled'] = change.new

0 commit comments

Comments
 (0)