-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[DOC] Added on modifier example to the input component #19205
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -38,7 +38,13 @@ import InternalComponent from './internal'; | |||||
|
||||||
### Actions | ||||||
|
||||||
The `Input` component takes a number of arguments with callbacks that are invoked in response to | ||||||
There are multiple ways to pass actions to the input component. Starting with Ember Octane, we recommend using the `{{on}}` modifier to call an action on specific events such as the input event. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we cross link to the documentation for the on modifier if that's available? |
||||||
|
||||||
```handlebars | ||||||
<Input @value={{this.name}} {{on "input" this.validateName}} /> | ||||||
``` | ||||||
|
||||||
The `Input` component also takes a number of arguments with callbacks that are invoked in response to | ||||||
user events. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* `enter` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
IMO we should do this for this for all the synthetic events and at the end of the list mention what they are (something along the lines of "Some of these do not correspond to a DOM event. Instead, they are synthetic/logical events that are fired by the |
||||||
|
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.