Skip to content

Commit

Permalink
feat(widget): add state/ctrl/context property
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed May 31, 2024
1 parent 286970d commit d12b475
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions trame_client/widgets/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,21 @@ def set_server(self, v):
"""Update the associated server"""
self._server = v

@property
def state(self):
"""Return the associated server state"""
return self.server.state

@property
def ctrl(self):
"""Return the associated server controller"""
return self.server.controller

@property
def ctx(self):
"""Return the associated server context"""
return self.server.context

# -------------------------------------------------------------------------
# Buildin API
# -------------------------------------------------------------------------
Expand Down

0 comments on commit d12b475

Please sign in to comment.