Returns the component id (str or dict) of the Input component that triggered the callback. Note - use `triggered_prop_ids` if you need both the component id and the prop that triggered the callback or if multiple Inputs triggered the callback. Example usage:
(self)
| 120 | @property |
| 121 | @has_context |
| 122 | def triggered_id(self): |
| 123 | """ |
| 124 | Returns the component id (str or dict) of the Input component that triggered the callback. |
| 125 | |
| 126 | Note - use `triggered_prop_ids` if you need both the component id and the prop that triggered the callback or if |
| 127 | multiple Inputs triggered the callback. |
| 128 | |
| 129 | Example usage: |
| 130 | `if "btn-1" == ctx.triggered_id: |
| 131 | do_something()` |
| 132 | |
| 133 | """ |
| 134 | component_id = None |
| 135 | if self.triggered: |
| 136 | prop_id = self.triggered_prop_ids.first() |
| 137 | component_id = self.triggered_prop_ids[prop_id] |
| 138 | return component_id |
| 139 | |
| 140 | @property |
| 141 | @has_context |