File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-form-controlled" ,
3
- "version" : " 0.16.14 " ,
3
+ "version" : " 0.16.15 " ,
4
4
"description" : " React controlled form components. The main idea is to make forms as simple as possible." ,
5
5
"author" : {
6
6
"name" : " Zlatko Fedor" ,
Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ export default class Input extends Element {
25
25
return fixUncontrolledValue ( super . getValue ( ) ) ;
26
26
}
27
27
28
+ @autobind
29
+ onKeyPress ( evn ) {
30
+ if ( evn . key === 'Enter' ) {
31
+ this . clearTimeout ( true ) ;
32
+ }
33
+ }
34
+
28
35
@autobind
29
36
onChange ( evn ) {
30
37
const { target } = evn ;
@@ -128,6 +135,7 @@ export default class Input extends Element {
128
135
onChange = { this . onChange }
129
136
onFocus = { this . onFocus }
130
137
onBlur = { this . onBlur }
138
+ onKeyPress = { this . onKeyPress }
131
139
checked = { checked || void 0 }
132
140
value = { value }
133
141
/>
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default class Textarea extends Input {
24
24
onChange = { this . onChange }
25
25
onFocus = { this . onFocus }
26
26
onBlur = { this . onBlur }
27
+ onKeyPress = { this . onKeyPress }
27
28
value = { this . state . value }
28
29
/>
29
30
) ;
You can’t perform that action at this time.
0 commit comments