File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ const CardNumber: React.FC<FramesCardFieldProps> = (props) => {
3131 style = { [ styles . cardNumber , props . style ] }
3232 onChangeText = { ( val : string ) => {
3333 dispatch ( { type : CARD_CHANGE , payload : val } ) ;
34+ props . onChangeText && props . onChangeText ( val ) ;
3435 if (
3536 val . replace ( / [ ^ 0 - 9 ] / g, "" ) . length >= 8 &&
3637 val . replace ( / [ ^ 0 - 9 ] / g, "" ) . substring ( 0 , 8 ) !==
Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ const Cvv: React.SFC<FramesFieldProps> = (props) => {
3030 style = { [ styles . cvv , props . style ] }
3131 value = { state . cvv }
3232 maxLength = { state . cvvLength }
33- onChangeText = { ( val : string ) =>
34- dispatch ( { type : CVV_CHANGE , payload : val } )
35- }
33+ onChangeText = { ( val : string ) => {
34+ dispatch ( { type : CVV_CHANGE , payload : val } ) ;
35+ props . onChangeText && props . onChangeText ( val ) ;
36+ } }
3637 />
3738 ) ;
3839 } }
Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ const ExpiryDate: React.SFC<FramesFieldProps> = (props) => {
2929 { ...props }
3030 style = { [ styles . expiryDate , props . style ] }
3131 value = { state . expiryDate }
32- onChangeText = { ( val : string ) =>
33- dispatch ( { type : DATE_CHANGE , payload : val } )
34- }
32+ onChangeText = { ( val : string ) => {
33+ dispatch ( { type : DATE_CHANGE , payload : val } ) ;
34+ props . onChangeText && props . onChangeText ( val ) ;
35+ } }
3536 />
3637 ) ;
3738 } }
You can’t perform that action at this time.
0 commit comments