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 validation = validate(value, validationType, contract);
|
||||
|
||||
if (validation instanceof Promise) {
|
||||
const loadingTimeout = setTimeout(() => {
|
||||
this.setState({ disabled: true, loading: true });
|
||||
}, 50);
|
||||
|
||||
return validation
|
||||
.then(validation => {
|
||||
this.setValidation({
|
||||
...validation,
|
||||
disabled: false,
|
||||
loading: false
|
||||
});
|
||||
return Promise.resolve(validation)
|
||||
.then((validation) => {
|
||||
clearTimeout(loadingTimeout);
|
||||
|
||||
event.target.focus();
|
||||
this.setValidation({
|
||||
...validation,
|
||||
disabled: false,
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
|
||||
this.setValidation(validation);
|
||||
event.target.focus();
|
||||
});
|
||||
}
|
||||
|
||||
onKeyDown = (event) => {
|
||||
|
@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
.token-container {
|
||||
flex: 1;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.full-width .token-container {
|
||||
|
Loading…
Reference in New Issue
Block a user