File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,9 @@ def _unmount_model_states(self, old_states: List[_ModelState]) -> None:
404
404
while to_unmount :
405
405
model_state = to_unmount .pop ()
406
406
407
+ for target in model_state .targets_by_event .values ():
408
+ del self ._event_handlers [target ]
409
+
407
410
if hasattr (model_state , "life_cycle_state" ):
408
411
life_cycle_state = model_state .life_cycle_state
409
412
del self ._model_states_by_life_cycle_state_id [life_cycle_state .id ]
@@ -583,7 +586,7 @@ def __init__(
583
586
self .targets_by_event = targets_by_event
584
587
"""The element's event handler target strings indexed by their event name"""
585
588
586
- # === Conditionally Evailable Attributes ===
589
+ # === Conditionally Available Attributes ===
587
590
# It's easier to conditionally assign than to force a null check on every usage
588
591
589
592
if parent is not None :
You can’t perform that action at this time.
0 commit comments