Fix Token Reg Dapp issues in Firefox (#4489)
* Fix overflow issues in Firefox (#4348) * Fix wrong Promise inferance * Add new Componennt for Token Images (#4496) * Revert "Add new Componennt for Token Images (#4496)" This reverts commit 6ffbdab891f85e4d988e3e8e96fc2c651bd68e04.
This commit is contained in:
parent
2043123db0
commit
867a593988
@ -105,22 +105,22 @@ export default class InputText extends Component {
|
|||||||
const { validationType, contract } = this.props;
|
const { validationType, contract } = this.props;
|
||||||
const validation = validate(value, validationType, contract);
|
const validation = validate(value, validationType, contract);
|
||||||
|
|
||||||
if (validation instanceof Promise) {
|
const loadingTimeout = setTimeout(() => {
|
||||||
this.setState({ disabled: true, loading: true });
|
this.setState({ disabled: true, loading: true });
|
||||||
|
}, 50);
|
||||||
|
|
||||||
return validation
|
return Promise.resolve(validation)
|
||||||
.then(validation => {
|
.then((validation) => {
|
||||||
this.setValidation({
|
clearTimeout(loadingTimeout);
|
||||||
...validation,
|
|
||||||
disabled: false,
|
|
||||||
loading: false
|
|
||||||
});
|
|
||||||
|
|
||||||
event.target.focus();
|
this.setValidation({
|
||||||
|
...validation,
|
||||||
|
disabled: false,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
this.setValidation(validation);
|
event.target.focus();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeyDown = (event) => {
|
onKeyDown = (event) => {
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.token-container {
|
.token-container {
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-width .token-container {
|
.full-width .token-container {
|
||||||
|
Loading…
Reference in New Issue
Block a user