mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +01:00
fix lazy evalutaion of loan form
This commit is contained in:
parent
b229dbb79f
commit
9a9aa68ca9
@ -68,8 +68,12 @@ let LoanForm = React.createClass({
|
|||||||
return this.props.id;
|
return this.props.id;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleOnBlur(event) {
|
handleOnChange(event) {
|
||||||
LoanContractActions.fetchLoanContract(event.target.value);
|
let potentialEmail = event.target.value;
|
||||||
|
|
||||||
|
if(potentialEmail.match(/.*@.*/)) {
|
||||||
|
LoanContractActions.fetchLoanContract(potentialEmail);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getContractCheckbox() {
|
getContractCheckbox() {
|
||||||
@ -151,7 +155,7 @@ let LoanForm = React.createClass({
|
|||||||
<Property
|
<Property
|
||||||
name='loanee'
|
name='loanee'
|
||||||
label={getLangText('Loanee Email')}
|
label={getLangText('Loanee Email')}
|
||||||
onBlur={this.handleOnBlur}
|
onChange={this.handleOnChange}
|
||||||
editable={!this.props.email}
|
editable={!this.props.email}
|
||||||
overrideForm={!!this.props.email}>
|
overrideForm={!!this.props.email}>
|
||||||
<input
|
<input
|
||||||
|
Loading…
Reference in New Issue
Block a user