1
0
Эх сурвалжийг харах

Apply convert_handlers_to_fns for substates (#846)

Seonghwan Choi 2 жил өмнө
parent
commit
5db622c7d4
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      pynecone/state.py

+ 2 - 0
pynecone/state.py

@@ -194,6 +194,8 @@ class State(Base, ABC):
         """
         for name, event_handler in cls.event_handlers.items():
             setattr(cls, name, event_handler.fn)
+        for substate in cls.get_substates():
+            substate.convert_handlers_to_fns()
 
     @classmethod
     def set_handlers(cls):