diff --git a/src/components/MeasureHeight.js b/src/components/MeasureHeight.js index 17aa631..0a0aa26 100644 --- a/src/components/MeasureHeight.js +++ b/src/components/MeasureHeight.js @@ -23,13 +23,15 @@ import { omit, debounce } from 'functions'; * */ +type ChildState = { [key: string]: any }; + export default class MeasureHeight extends PureComponent<{ shouldMeasure: (prevState: any, newState: any) => bool, onMeasure: (height: number) => void, - state: any + state: ChildState }> { static defaultProps = { - shouldMeasure: (prevState: any, newState: any) => prevState !== newState, + shouldMeasure: (prevState: ChildState, newState: ChildState) => prevState !== newState, onMeasure: (height: number) => {} // eslint-disable-line }; diff --git a/src/components/auth/PanelTransition.js b/src/components/auth/PanelTransition.js index 7f64f52..7941473 100644 --- a/src/components/auth/PanelTransition.js +++ b/src/components/auth/PanelTransition.js @@ -339,8 +339,17 @@ class PanelTransition extends Component { } shouldMeasureHeight() { + const errorString = Object.values(this.props.auth.error || {}) + .reduce((acc, item) => { + if (typeof item === 'string') { + return acc + item; + } + + return acc + item.type; + }, ''); + return [ - this.props.auth.error, + errorString, this.state.isHeightDirty, this.props.user.lang, this.props.accounts.available.length