#48: recalculate choose account panel height, when user log out from one account

This commit is contained in:
SleepWalker 2016-11-19 14:37:17 +02:00
parent 97faabbc70
commit fa070096c6

View File

@ -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)