Browse Source

enforce event handler for ui.keyboard

Falko Schindler 2 years ago
parent
commit
995ffe4b58
1 changed files with 2 additions and 2 deletions
  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 ..binding import BindableProperty
 from ..element import Element
 from ..element import Element
@@ -11,7 +11,7 @@ register_component('keyboard', __file__, 'keyboard.js')
 class Keyboard(Element):
 class Keyboard(Element):
     active = BindableProperty()
     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
         Keyboard