Open
Conversation
mturoci
requested changes
Dec 18, 2020
Collaborator
mturoci
left a comment
There was a problem hiding this comment.
Good job @VijithaEkanayake! A few comments from me.
py/examples/textbox.py
Outdated
Comment on lines
25
to
29
| elif q.args.enter_key_handler: | ||
| q.page['example'].items = [ | ||
| ui.text(f'textbox_enter_key_handler={q.args.enter_key_handler}'), | ||
| ui.button(name='show_form', label='Back', primary=True), | ||
| ] |
Collaborator
There was a problem hiding this comment.
I guess a better scenario would be to show every input filled (add the enter handler logic to q.args.show if branch instead), not just enter handler as the enter submits the whole form, not just a single item and might cause confusion for some people. @lo5 wdyt.
py/examples/textbox.py
Outdated
| ui.textbox(name='textbox_placeholder', label='With placeholder', placeholder='I need some input'), | ||
| ui.textbox(name='textbox_disabled_placeholder', label='Disabled with placeholder', disabled=True, | ||
| placeholder='I am disabled'), | ||
| ui.textbox(name='enter_key_handler', label='Submits the textbox value on Enter key', icon='Search'), |
Collaborator
There was a problem hiding this comment.
Go with convention format: textbox_*** so textbox_enter or something for your case.
Collaborator
Co-authored-by: mturoci <64769322+mturoci@users.noreply.github.com>
Co-authored-by: mturoci <64769322+mturoci@users.noreply.github.com>
The implementation conditionally calls the keyup handler based on the values of the submit attribute. Fixes: #372
be42109 to
54ea7d5
Compare
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #372