Skip to content

Commit

Permalink
remove onClose from dropdown (#2585)
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Apr 24, 2017
1 parent 53a73db commit 9a4895a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ const propTypes = {
*/
open: PropTypes.bool,

/**
* A callback fired when the Dropdown closes.
*/
onClose: PropTypes.func,

/**
* A callback fired when the Dropdown wishes to change visibility. Called with the requested
* `open` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
Expand Down Expand Up @@ -256,7 +251,7 @@ class Dropdown extends React.Component {
});
}

renderMenu(child, { id, onClose, onSelect, rootCloseEvent, ...props }) {
renderMenu(child, { id, onSelect, rootCloseEvent, ...props }) {
let ref = c => { this.menu = c; };

if (typeof child.ref === 'string') {
Expand All @@ -275,9 +270,7 @@ class Dropdown extends React.Component {
labelledBy: id,
bsClass: prefix(props, 'menu'),
onClose: createChainedFunction(
child.props.onClose,
onClose,
this.handleClose,
child.props.onClose, this.handleClose,
),
onSelect: createChainedFunction(
child.props.onSelect,
Expand All @@ -296,7 +289,6 @@ class Dropdown extends React.Component {
disabled,
pullRight,
open,
onClose,
onSelect,
role,
bsClass,
Expand Down Expand Up @@ -335,7 +327,7 @@ class Dropdown extends React.Component {
});
case MENU_ROLE:
return this.renderMenu(child, {
id, open, pullRight, bsClass, onClose, onSelect, rootCloseEvent,
id, open, pullRight, bsClass, onSelect, rootCloseEvent,
});
default:
return child;
Expand Down

0 comments on commit 9a4895a

Please sign in to comment.