-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add boolean properties in UserMenu component (issue 1402) #1404
Conversation
@@ -58,13 +64,25 @@ const UserMenu = React.createClass({ | |||
}, | |||
renderLoggedTools() { | |||
let DropDown = this.props.nav ? NavDropdown : DropdownButton; | |||
let showAccountInfoItem = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better using an array of items and push each enabled item in it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
itemArray.push(<MenuItem key="passwordChange" onClick={this.props.onShowChangePassword}> <Glyphicon glyph="asterisk" /> <Message msgId="user.changePwd"/></MenuItem>); | ||
} | ||
if (this.props.showLogout) { | ||
itemArray.push(<MenuItem key="divider" divider />); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would push the divider only if itemArray.length > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
No description provided.