diff --git a/docs/src/app/components/pages/components/drop-down-menu.jsx b/docs/src/app/components/pages/components/drop-down-menu.jsx index 7b7fc2a4051bb8..c3e2e501605bd4 100644 --- a/docs/src/app/components/pages/components/drop-down-menu.jsx +++ b/docs/src/app/components/pages/components/drop-down-menu.jsx @@ -92,6 +92,12 @@ export default class DropDownMenuPage extends React.Component { header: 'default: false', desc: 'Disables the menu.', }, + { + name: 'openImmediately', + type: 'bool', + header: 'default: false', + desc: 'Set to true to have the DropDownMenu automatically open on mount.', + }, ], }, { diff --git a/src/drop-down-menu.jsx b/src/drop-down-menu.jsx index a46d9da155ac96..610b02a2fe2d94 100644 --- a/src/drop-down-menu.jsx +++ b/src/drop-down-menu.jsx @@ -46,6 +46,7 @@ const DropDownMenu = React.createClass({ iconStyle:React.PropTypes.object, labelStyle:React.PropTypes.object, selectedIndex: React.PropTypes.number, + openImmediately: React.PropTypes.bool, }, getDefaultProps() { @@ -54,12 +55,13 @@ const DropDownMenu = React.createClass({ disabled: false, valueMember: 'payload', displayMember: 'text', + openImmediately: false, }; }, getInitialState() { return { - open: false, + open: this.props.openImmediately, selectedIndex: this._isControlled() ? null : (this.props.selectedIndex || 0), muiTheme: this.context.muiTheme ? this.context.muiTheme : ThemeManager.getMuiTheme(DefaultRawTheme), };