7
7
8
8
@app ('/demo' )
9
9
async def serve (q : Q ):
10
- if q .args .show_inputs :
10
+ if q .args .textbox is not None :
11
11
q .page ['example' ].items = [
12
12
ui .text (f'textbox={ q .args .textbox } ' ),
13
13
ui .text (f'textbox_disabled={ q .args .textbox_disabled } ' ),
@@ -22,6 +22,7 @@ async def serve(q: Q):
22
22
ui .text (f'textbox_disabled_placeholder={ q .args .textbox_disabled_placeholder } ' ),
23
23
ui .text (f'textbox_multiline={ q .args .textbox_multiline } ' ),
24
24
ui .text (f'textbox_spellcheck_disabled={ q .args .textbox_spellcheck_disabled } ' ),
25
+ ui .text (f'textbox_enter={ q .args .textbox_enter } ' ),
25
26
ui .button (name = 'show_form' , label = 'Back' , primary = True ),
26
27
]
27
28
else :
@@ -40,7 +41,7 @@ async def serve(q: Q):
40
41
placeholder = 'I am disabled' ),
41
42
ui .textbox (name = 'textbox_multiline' , label = 'Multiline textarea' , multiline = True ),
42
43
ui .textbox (name = 'textbox_spellcheck_disabled' , label = 'Spellcheck disabled' , spellcheck = False ),
43
- ui .textbox (name = 'textbox_enter' , label = 'Submits the textbox value on Enter key' , icon = 'Search' ),
44
+ ui .textbox (name = 'textbox_enter' , label = 'Submit the form when pressing the Enter key' , trigger_on_enter = True ),
44
45
ui .button (name = 'show_inputs' , label = 'Submit' , primary = True ),
45
46
])
46
47
await q .page .save ()
0 commit comments