Skip to content

Commit

Permalink
Close Left Menu after selection after changes issue #76
Browse files Browse the repository at this point in the history
  • Loading branch information
Syed Asher Ahmed committed Apr 4, 2017
1 parent 8e13137 commit 891537d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions imports/ui/components/leftMenu/LeftMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,27 @@ export default class LeftMenu extends Component {
isActive(path){
return this.props.location.pathname == `/app/${path}` ? listItemTheme.active : ''
}
closeLeftMenu(){
this.toggleDrawerActive();
}

render() {
return (
<Drawer theme={drawerTheme} active={this.state.drawerActive} onOverlayClick={ this.toggleDrawerActive.bind(this) }>
<List className={theme.list} selectable ripple>
<Link to={`/app/dashboard`} onClick={this.closeLeftMenu.bind(this)}>
<Link to={`/app/dashboard`} onClick={this.toggleDrawerActive.bind(this)}>
<ListItem className={this.isActive('dashboard')} caption='Dashboard' leftIcon='dashboard' theme={listItemTheme}/>
</Link>
<Link to={`/app/projects`} onClick={this.closeLeftMenu.bind(this)}>
<Link to={`/app/projects`} onClick={this.toggleDrawerActive.bind(this)}>
<ListItem className={this.isActive('projects')} caption='Project' leftIcon='timeline' theme={listItemTheme}/>
</Link>
<Link to={`/app/transactions`} onClick={this.closeLeftMenu.bind(this)}>
<Link to={`/app/transactions`} onClick={this.toggleDrawerActive.bind(this)}>
<ListItem className={this.isActive('transa•••ctions')} caption='Transactions' leftIcon='monetization_on' theme={listItemTheme}/>
</Link>
<Link to={`/app/accounts`} onClick={this.closeLeftMenu.bind(this)}>
<Link to={`/app/accounts`} onClick={this.toggleDrawerActive.bind(this)}>
<ListItem className={this.isActive('accounts')} caption='Accounts' leftIcon='account_balance' theme={listItemTheme}/>
</Link>
<Link to={`/app/categories`} onClick={this.closeLeftMenu.bind(this)}>
<Link to={`/app/categories`} onClick={this.toggleDrawerActive.bind(this)}>
<ListItem className={this.isActive('categories')} caption='Categories' leftIcon='view_module' theme={listItemTheme}/>
</Link>
<Link to={`/app/settings/new`} onClick={this.closeLeftMenu.bind(this)}>
<Link to={`/app/settings/new`} onClick={this.toggleDrawerActive.bind(this)}>
<ListItem className={this.isActive('settings/new')} caption='Settings' leftIcon='settings' theme={listItemTheme}/>
</Link>
<ListItem caption='Logout' leftIcon='power_settings_new' onClick={this.logout.bind(this)} theme={listItemTheme}/>
Expand Down

0 comments on commit 891537d

Please sign in to comment.