File tree 2 files changed +5
-4
lines changed 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ bower_components
12
12
13
13
Example
14
14
15
+ App.js
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ class FloatingLabel extends Component {
7
7
constructor ( props ) {
8
8
super ( props )
9
9
this . state = {
10
- fieldFocused : false ,
11
- value : undefined ,
12
- fadeAnim : new Animated . Value ( 0 ) ,
10
+ fieldFocused : ( props . value ) ? true : false ,
11
+ value : ( props . value ) ? String ( props . value ) : undefined ,
12
+ fadeAnim : ( props . value ) ? new Animated . Value ( 1 ) : new Animated . Value ( 0 ) ,
13
13
placeholderString : undefined ,
14
14
}
15
15
}
@@ -75,8 +75,8 @@ class FloatingLabel extends Component {
75
75
secureTextEntry = { locals . secureTextEntry }
76
76
selectionState = { locals . selectionState }
77
77
onChangeText = { ( value ) => {
78
- self . _onChangeText . bind ( self , value , locals )
79
78
locals . onChange ( value )
79
+ self . _onChangeText . bind ( self , value , locals )
80
80
} }
81
81
placeholder = { placeholderString }
82
82
maxLength = { locals . maxLength }
You can’t perform that action at this time.
0 commit comments