mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-01-16 00:23:10 +05:30
#48: recalculate choose account panel height, when user log out from one account
This commit is contained in:
parent
97faabbc70
commit
fa070096c6
@ -89,6 +89,9 @@ class PanelTransition extends Component {
|
|||||||
login: PropTypes.string
|
login: PropTypes.string
|
||||||
}),
|
}),
|
||||||
user: userShape,
|
user: userShape,
|
||||||
|
accounts: PropTypes.shape({
|
||||||
|
available: PropTypes.array
|
||||||
|
}),
|
||||||
requestRedraw: PropTypes.func,
|
requestRedraw: PropTypes.func,
|
||||||
clearErrors: PropTypes.func,
|
clearErrors: PropTypes.func,
|
||||||
resolve: PropTypes.func,
|
resolve: PropTypes.func,
|
||||||
@ -308,7 +311,12 @@ class PanelTransition extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldMeasureHeight() {
|
shouldMeasureHeight() {
|
||||||
return [this.props.auth.error, this.state.isHeightDirty, this.props.user.lang].join('');
|
return [
|
||||||
|
this.props.auth.error,
|
||||||
|
this.state.isHeightDirty,
|
||||||
|
this.props.user.lang,
|
||||||
|
this.props.accounts.available.length
|
||||||
|
].join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
getHeader({key, style, data}) {
|
getHeader({key, style, data}) {
|
||||||
@ -457,6 +465,7 @@ export default connect((state) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
|
accounts: state.accounts, // need this, to re-render height
|
||||||
auth: state.auth,
|
auth: state.auth,
|
||||||
resolve: authFlow.resolve.bind(authFlow),
|
resolve: authFlow.resolve.bind(authFlow),
|
||||||
reject: authFlow.reject.bind(authFlow)
|
reject: authFlow.reject.bind(authFlow)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user