Explorar el Código

enforce event handler for ui.keyboard

Falko Schindler hace 2 años
padre
commit
995ffe4b58
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      nicegui/elements/keyboard.py

+ 2 - 2
nicegui/elements/keyboard.py

@@ -1,4 +1,4 @@
-from typing import Callable, Dict, Optional
+from typing import Callable, Dict
 
 from ..binding import BindableProperty
 from ..element import Element
@@ -11,7 +11,7 @@ register_component('keyboard', __file__, 'keyboard.js')
 class Keyboard(Element):
     active = BindableProperty()
 
-    def __init__(self, *, on_key: Optional[Callable] = None, active: bool = True, repeating: bool = True) -> None:
+    def __init__(self, on_key: Callable, *, active: bool = True, repeating: bool = True) -> None:
         """
         Keyboard