mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-26 15:00:23 +05:30
01.01.2018
This commit is contained in:
parent
7cb8dda4d3
commit
94217ff519
@ -113,7 +113,18 @@ class PanelTransition extends Component {
|
|||||||
return {
|
return {
|
||||||
auth: this.props.auth,
|
auth: this.props.auth,
|
||||||
user: this.props.user,
|
user: this.props.user,
|
||||||
requestRedraw: () => this.setState({isHeightDirty: true}, () => this.setState({isHeightDirty: false})),
|
requestRedraw: () =>
|
||||||
|
new Promise((resolve) =>
|
||||||
|
this.setState(
|
||||||
|
{isHeightDirty: true},
|
||||||
|
() => {
|
||||||
|
this.setState({isHeightDirty: false});
|
||||||
|
|
||||||
|
// wait till transition end
|
||||||
|
setTimeout(resolve, 200);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
),
|
||||||
clearErrors: this.props.clearErrors,
|
clearErrors: this.props.clearErrors,
|
||||||
resolve: this.props.resolve,
|
resolve: this.props.resolve,
|
||||||
reject: this.props.reject
|
reject: this.props.reject
|
||||||
|
@ -82,9 +82,8 @@ export default class ForgotPasswordBody extends BaseAuthBody {
|
|||||||
this.setState({
|
this.setState({
|
||||||
isLoginEdit: true
|
isLoginEdit: true
|
||||||
});
|
});
|
||||||
this.context.requestRedraw();
|
|
||||||
// TODO: requestRedraw должен возвращать promise, по которому нужно ставить фокус на поле
|
this.context.requestRedraw()
|
||||||
// иначе же, если фокус ставить сразу, то форма скачет
|
.then(() => this.form.focus('login'));
|
||||||
setTimeout(() => {this.form.focus('login');}, 300);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user