mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
Blocks-Backend-Events
- add change event to TabItem
This commit is contained in:
parent
15c9175e90
commit
860ea5c7d3
@ -87,6 +87,16 @@ class TabItem(BlockContext):
|
||||
def get_template_context(self):
|
||||
return {"label": self.label}
|
||||
|
||||
def change(self, fn: Callable, inputs: List[Component], outputs: List[Component]):
|
||||
"""
|
||||
Parameters:
|
||||
fn: Callable function
|
||||
inputs: List of inputs
|
||||
outputs: List of outputs
|
||||
Returns: None
|
||||
"""
|
||||
self.set_event_trigger("change", fn, inputs, outputs)
|
||||
|
||||
|
||||
class Blocks(Launchable, BlockContext):
|
||||
def __init__(self, theme="default"):
|
||||
|
Loading…
Reference in New Issue
Block a user