From 796009cb4ac9d43ab2f3aaa561ebc8cccb2d5981 Mon Sep 17 00:00:00 2001 From: An Le Phu Nguyen Date: Sat, 12 Mar 2016 07:19:23 +0700 Subject: [PATCH] [IconMenu] Set container as anchorEl when using prop 'open' --- src/menus/icon-menu.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/menus/icon-menu.jsx b/src/menus/icon-menu.jsx index a799126fd2acd9..a80b12c2d7f65e 100644 --- a/src/menus/icon-menu.jsx +++ b/src/menus/icon-menu.jsx @@ -180,8 +180,11 @@ const IconMenu = React.createClass({ muiTheme: nextContext.muiTheme || this.state.muiTheme, }); - if (nextProps.open === true || nextProps.open === false) { - this.setState({open: nextProps.open}); + if (nextProps.open !== null) { + this.setState({ + open: nextProps.open, + anchorEl: this.refs.iconMenuContainer, + }); } }, @@ -315,6 +318,7 @@ const IconMenu = React.createClass({ return (