Skip to content

Commit

Permalink
Merge pull request #7 from kecnry/plugin-component-send-state
Browse files Browse the repository at this point in the history
allow plugin components to call `send_state`
  • Loading branch information
rosteen authored Dec 13, 2024
2 parents a191b08 + ac00191 commit 11ec1d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,10 @@ def add_observe(self, traitlet_name, handler, first=False):
new_order = [handler] + [other for other in existing_callbacks if other != handler]
self._plugin._trait_notifiers[traitlet_name]['change'] = new_order

def send_state(self, traitlet_name):
# redirect send_state through the plugin
self._plugin.send_state(self._plugin_traitlets.get(traitlet_name))

@property
def plugin(self):
"""
Expand Down

0 comments on commit 11ec1d1

Please sign in to comment.