-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Improve documentation of EditableText
/TextField
callbacks
#98414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation of EditableText
/TextField
callbacks
#98414
Conversation
EditableText
/TextField
callbacks
/// | ||
/// When the user has finalized editing, by default [onSubmitted] is called after | ||
/// [onChanged] or after [onEditingComplete] when the default behaviour is overridden. | ||
/// See [onEditingComplete] for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe:
/// By default, [onSubmitted] is called after [onChanged] when the user
/// has finalized editing; or, if the default behavior has been overridden,
/// after [onEditingComplete]. See [onEditingComplete] for details.
Also minor nit, behaviour -> behavior. I'm guilty of adding hundreds of non-US spellings to our codebase myself, and occasionally do passes over the code to fix all the ones I missed 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh thanks so much, I will keep it in mind for future doc PRs)
b7bb6f8
to
87d16ca
Compare
fixes #27581
1. TextField doesn't mention order of
onSubmitted
vsonEditingComplete
vsonChanged
.Solution:
Made Lifecycle from EditableText as a template so it can be reused in TextField
2. The documentation for each of these events doesn't mention the others.
Solution:
onSubmitted
to indicate when it will be called relative to other callbacksonChange
to indicate when it will be called relative to other callbacksPre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.