Skip to content

Commit 43bb9e9

Browse files
authored
Apply suggestions from code review
1 parent 21fd8bc commit 43bb9e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

guides/release/templates/input-helpers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To dispatch an action on specific events such as `key-press`, use the following
5252

5353
```handlebars
5454
<label for="firstname">First Name</label>
55-
<Input value={{this.firstName}} key-press={{action "updateFirstName" id="firstname"}} />
55+
<Input @value={{this.firstName}} @key-press={{action "updateFirstName" id="firstname"}} />
5656
```
5757

5858
The following event types are supported (dasherized format):
@@ -76,7 +76,7 @@ helper to create a checkbox by setting its `type`:
7676

7777
```handlebars
7878
<label for="is-admin">Admin: </label>
79-
<Input type="checkbox" name="isAdmin" checked={{this.isAdmin}} id="is-admin"/>
79+
<Input @type="checkbox" @name="isAdmin" @checked={{this.isAdmin}} id="is-admin"/>
8080
```
8181

8282
Checkboxes support the following properties:
@@ -97,15 +97,15 @@ Checkboxes are a special input type. If you want to dispatch an action on a cert
9797

9898
```handlebars
9999
<label for="firstname">First Name</label>
100-
<Input type="checkbox" key-press={{action "updateName"}} id="firstname" />
100+
<Input @type="checkbox" @key-press={{action "updateName"}} id="firstname" />
101101
```
102102

103103

104104
## Text Areas
105105

106106
```handlebars
107107
<label for="firstname">First Name</label>
108-
<Textarea value={{this.name}} cols="80" rows="6" id="firstname" />
108+
<Textarea @value={{this.name}} cols="80" rows="6" id="firstname" />
109109
```
110110

111111
Will bind the value of the text area to `name` on the current context.
@@ -136,7 +136,7 @@ You might need to bind a property dynamically to an input if you're building a f
136136

137137
```handlebars
138138
<label for="firstname">First Name</label>
139-
<Input value={{mut (get this.person this.field)}} id="firstname" />
139+
<Input @value={{mut (get this.person this.field)}} id="firstname" />
140140
```
141141

142142
The `{{get}}` helper allows you to dynamically specify which property to bind, while the `{{mut}}` helper allows the binding to be updated from the input. See the respective helper documentation for more detail.

0 commit comments

Comments
 (0)