Add Check and Change Password for an Account (#2861)
* Added new RPC endpoints to JSAPI (#2389) * Added modal in Account Page to test & modify password (#2389) * Modify hint with password change // Better tabs (#2556)
This commit is contained in:
committed by
Gav Wood
parent
e71c752210
commit
2d2e9c4d6e
@@ -44,13 +44,18 @@ export default class Input extends Component {
|
||||
onSubmit: PropTypes.func,
|
||||
rows: PropTypes.number,
|
||||
type: PropTypes.string,
|
||||
submitOnBlur: PropTypes.bool,
|
||||
value: PropTypes.oneOfType([
|
||||
PropTypes.number, PropTypes.string
|
||||
])
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
submitOnBlur: true
|
||||
}
|
||||
|
||||
state = {
|
||||
value: this.props.value
|
||||
value: this.props.value || ''
|
||||
}
|
||||
|
||||
componentWillReceiveProps (newProps) {
|
||||
@@ -97,8 +102,11 @@ export default class Input extends Component {
|
||||
|
||||
onBlur = (event) => {
|
||||
const { value } = event.target;
|
||||
const { submitOnBlur } = this.props;
|
||||
|
||||
this.onSubmit(value);
|
||||
if (submitOnBlur) {
|
||||
this.onSubmit(value);
|
||||
}
|
||||
|
||||
this.props.onBlur && this.props.onBlur(event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user