mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-29 00:10:54 +05:30
parent
876d3da4ab
commit
c06b92be39
@ -64,7 +64,7 @@ export default class LoggedInPanel extends Component {
|
|||||||
|
|
||||||
onBodyClick = createOnOutsideComponentClickHandler(
|
onBodyClick = createOnOutsideComponentClickHandler(
|
||||||
() => ReactDOM.findDOMNode(this),
|
() => ReactDOM.findDOMNode(this),
|
||||||
() => this.state.isAccountSwitcherActive,
|
() => this.state.isAccountSwitcherActive && this._isMounted,
|
||||||
() => this.toggleAccountSwitcher()
|
() => this.toggleAccountSwitcher()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -78,6 +78,7 @@ export default class LoggedInPanel extends Component {
|
|||||||
* @param {function} getEl - the function, that returns reference to container el
|
* @param {function} getEl - the function, that returns reference to container el
|
||||||
* @param {function} isActive - whether the component is active and callback may be called
|
* @param {function} isActive - whether the component is active and callback may be called
|
||||||
* @param {function} callback - the callback to call, when there was a click outside el
|
* @param {function} callback - the callback to call, when there was a click outside el
|
||||||
|
*
|
||||||
* @return {function}
|
* @return {function}
|
||||||
*/
|
*/
|
||||||
function createOnOutsideComponentClickHandler(getEl, isActive, callback) {
|
function createOnOutsideComponentClickHandler(getEl, isActive, callback) {
|
||||||
|
Loading…
Reference in New Issue
Block a user