File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,15 @@ export default class MaskedInput extends React.PureComponent {
8
8
constructor ( ...args ) {
9
9
super ( ...args )
10
10
11
+ this . setRef = this . setRef . bind ( this )
11
12
this . onBlur = this . onBlur . bind ( this )
12
13
this . onChange = this . onChange . bind ( this )
13
14
}
14
15
16
+ setRef ( inputElement ) {
17
+ this . inputElement = inputElement
18
+ }
19
+
15
20
initTextMask ( ) {
16
21
const { props, props : { value} } = this
17
22
@@ -66,9 +71,7 @@ export default class MaskedInput extends React.PureComponent {
66
71
delete props . onChange
67
72
delete props . showMask
68
73
69
- const ref = ( inputElement ) => ( this . inputElement = inputElement )
70
-
71
- return render ( ref , {
74
+ return render ( this . setRef , {
72
75
onBlur : this . onBlur ,
73
76
onChange : this . onChange ,
74
77
defaultValue : this . props . value ,
You can’t perform that action at this time.
0 commit comments