|
@@ -1,8 +1,18 @@
|
|
from nicegui import ui
|
|
from nicegui import ui
|
|
|
|
|
|
|
|
+from ..documentation_tools import text_demo
|
|
|
|
+
|
|
|
|
|
|
def main_demo() -> None:
|
|
def main_demo() -> None:
|
|
ui.input(label='Text', placeholder='start typing',
|
|
ui.input(label='Text', placeholder='start typing',
|
|
on_change=lambda e: result.set_text('you typed: ' + e.value),
|
|
on_change=lambda e: result.set_text('you typed: ' + e.value),
|
|
validation={'Input too long': lambda value: len(value) < 20})
|
|
validation={'Input too long': lambda value: len(value) < 20})
|
|
result = ui.label()
|
|
result = ui.label()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+def more() -> None:
|
|
|
|
+
|
|
|
|
+ @text_demo('Auto complete input', 'description')
|
|
|
|
+ async def autocompleteinput():
|
|
|
|
+ options = ['AutoComplete', 'NiceGUI', 'Awesome']
|
|
|
|
+ ui.input(label='Text', placeholder='start typing', autocomplete=options)
|