Skip to content

Commit

Permalink
[IconMenu] Change reason
Browse files Browse the repository at this point in the history
  • Loading branch information
quangbuule committed Dec 5, 2015
1 parent 41408d6 commit b355d64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/src/app/components/pages/components/icon-menus.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class IconMenus extends React.Component {
{
name: 'open',
type: 'bool',
header: 'default: true',
header: 'default: null',
desc: 'Controls whether the IconMenu is opened or not.',
},
{
Expand Down Expand Up @@ -145,7 +145,7 @@ export default class IconMenus extends React.Component {
'requested to be changed. The provided open argument determines whether the ' +
'menu is requested to be opened or closed. Also, the reason argument states ' +
'why the menu got closed or opened. It can be \'keyboard\', \'iconTap\' for ' +
'open action and \'enter\', \'esc\', \'itemTap\', \'clickAway\' for close ' +
'open action and \'enter\', \'escape\', \'itemTap\', \'clickAway\' for close ' +
'action.',
},
{
Expand Down Expand Up @@ -309,7 +309,7 @@ export default class IconMenus extends React.Component {
<div>
<IconMenu
open={this.state.isIconMenuOpened || false}
onRequestChange={(open, reason) => console.log(reason) || this.setState({isIconMenuOpened: open})}
onRequestChange={open => this.setState({isIconMenuOpened: open})}
iconButtonElement={iconButtonElement}>
<MenuItem primaryText="Preview" leftIcon={<RemoveRedEye />} />
<MenuItem primaryText="Share" leftIcon={<PersonAdd />} />
Expand Down
2 changes: 1 addition & 1 deletion src/menus/icon-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const IconMenu = React.createClass({
},

_handleMenuEscKeyDown(event) {
this.close('esc', event);
this.close('escape', event);
},

});
Expand Down

0 comments on commit b355d64

Please sign in to comment.