File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ bower_components
1212
1313Example
1414
15+ App.js
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ class FloatingLabel extends Component {
77 constructor ( props ) {
88 super ( props )
99 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 ) ,
1313 placeholderString : undefined ,
1414 }
1515 }
@@ -75,8 +75,8 @@ class FloatingLabel extends Component {
7575 secureTextEntry = { locals . secureTextEntry }
7676 selectionState = { locals . selectionState }
7777 onChangeText = { ( value ) => {
78- self . _onChangeText . bind ( self , value , locals )
7978 locals . onChange ( value )
79+ self . _onChangeText . bind ( self , value , locals )
8080 } }
8181 placeholder = { placeholderString }
8282 maxLength = { locals . maxLength }
You can’t perform that action at this time.
0 commit comments