Skip to content

Commit

Permalink
Close Left Menu After Selection issue #76
Browse files Browse the repository at this point in the history
  • Loading branch information
Syed Asher Ahmed committed Mar 30, 2017
1 parent 3a4d2dd commit 8e13137
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions imports/ui/components/leftMenu/LeftMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,29 @@ 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`}>
<Link to={`/app/dashboard`} onClick={this.closeLeftMenu.bind(this)}>
<ListItem className={this.isActive('dashboard')} caption='Dashboard' leftIcon='dashboard' theme={listItemTheme}/>
</Link>
<Link to={`/app/projects`}>
<Link to={`/app/projects`} onClick={this.closeLeftMenu.bind(this)}>
<ListItem className={this.isActive('projects')} caption='Project' leftIcon='timeline' theme={listItemTheme}/>
</Link>
<Link to={`/app/transactions`}>
<ListItem className={this.isActive('transactions')} caption='Transactions' leftIcon='monetization_on' theme={listItemTheme}/>
<Link to={`/app/transactions`} onClick={this.closeLeftMenu.bind(this)}>
<ListItem className={this.isActive('transa•••ctions')} caption='Transactions' leftIcon='monetization_on' theme={listItemTheme}/>
</Link>
<Link to={`/app/accounts`}>
<Link to={`/app/accounts`} onClick={this.closeLeftMenu.bind(this)}>
<ListItem className={this.isActive('accounts')} caption='Accounts' leftIcon='account_balance' theme={listItemTheme}/>
</Link>
<Link to={`/app/categories`}>
<Link to={`/app/categories`} onClick={this.closeLeftMenu.bind(this)}>
<ListItem className={this.isActive('categories')} caption='Categories' leftIcon='view_module' theme={listItemTheme}/>
</Link>
<Link to={`/app/settings/new`}>
<Link to={`/app/settings/new`} onClick={this.closeLeftMenu.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 8e13137

Please sign in to comment.