From fa070096c650ca6dad7689d27b1e4bca555b7c23 Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Sat, 19 Nov 2016 14:37:17 +0200 Subject: [PATCH] #48: recalculate choose account panel height, when user log out from one account --- src/components/auth/PanelTransition.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/auth/PanelTransition.jsx b/src/components/auth/PanelTransition.jsx index 8d09d73..3746720 100644 --- a/src/components/auth/PanelTransition.jsx +++ b/src/components/auth/PanelTransition.jsx @@ -89,6 +89,9 @@ class PanelTransition extends Component { login: PropTypes.string }), user: userShape, + accounts: PropTypes.shape({ + available: PropTypes.array + }), requestRedraw: PropTypes.func, clearErrors: PropTypes.func, resolve: PropTypes.func, @@ -308,7 +311,12 @@ class PanelTransition extends Component { } 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}) { @@ -457,6 +465,7 @@ export default connect((state) => { return { user, + accounts: state.accounts, // need this, to re-render height auth: state.auth, resolve: authFlow.resolve.bind(authFlow), reject: authFlow.reject.bind(authFlow)