@@ -51,10 +51,11 @@ def states(self):
51
51
@has_context
52
52
def triggered (self ):
53
53
"""
54
- Returns a list of all the Input props that changed and caused the callback to execute. It is empty when the callback is
55
- called on initial load, unless an Input prop got its value from another initial callback. Callbacks triggered
56
- by user actions typically have one item in triggered, unless the same action changes two props at once or
57
- the callback has several Input props that are all modified by another callback based on a single user action.
54
+ Returns a list of all the Input props that changed and caused the callback to execute. It is empty when the
55
+ callback is called on initial load, unless an Input prop got its value from another initial callback.
56
+ Callbacks triggered by user actions typically have one item in triggered, unless the same action changes
57
+ two props at once or the callback has several Input props that are all modified by another callback based on
58
+ a single user action.
58
59
59
60
Example: To get the id of the component that triggered the callback:
60
61
`component_id = ctx.triggered[0]['prop_id'].split('.')[0]`
@@ -72,10 +73,11 @@ def triggered(self):
72
73
@has_context
73
74
def triggered_prop_ids (self ):
74
75
"""
75
- Returns a dictionary of all the Input props that changed and caused the callback to execute. It is empty when the callback is
76
- called on initial load, unless an Input prop got its value from another initial callback. Callbacks triggered
77
- by user actions typically have one item in triggered, unless the same action changes two props at once or
78
- the callback has several Input props that are all modified by another callback based on a single user action.
76
+ Returns a dictionary of all the Input props that changed and caused the callback to execute. It is empty when
77
+ the callback is called on initial load, unless an Input prop got its value from another initial callback.
78
+ Callbacks triggered by user actions typically have one item in triggered, unless the same action changes
79
+ two props at once or the callback has several Input props that are all modified by another callback based
80
+ on a single user action.
79
81
80
82
triggered_prop_ids (dict):
81
83
- keys (str) : the triggered "prop_id" composed of "component_id.component_property"
@@ -287,4 +289,4 @@ def using_outputs_grouping(self):
287
289
288
290
289
291
callback_context = CallbackContext ()
290
- ctx = CallbackContext ()
292
+
0 commit comments