File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
docs/src/app/components/pages/components Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,12 @@ export default class DropDownMenuPage extends React.Component {
9292 header : 'default: false' ,
9393 desc : 'Disables the menu.' ,
9494 } ,
95+ {
96+ name : 'openImmediately' ,
97+ type : 'bool' ,
98+ header : 'default: false' ,
99+ desc : 'Set to true to have the DropDownMenu automatically open on mount.' ,
100+ } ,
95101 ] ,
96102 } ,
97103 {
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ const DropDownMenu = React.createClass({
4646 iconStyle :React . PropTypes . object ,
4747 labelStyle :React . PropTypes . object ,
4848 selectedIndex : React . PropTypes . number ,
49+ openImmediately : React . PropTypes . bool ,
4950 } ,
5051
5152 getDefaultProps ( ) {
@@ -54,12 +55,13 @@ const DropDownMenu = React.createClass({
5455 disabled : false ,
5556 valueMember : 'payload' ,
5657 displayMember : 'text' ,
58+ openImmediately : false ,
5759 } ;
5860 } ,
5961
6062 getInitialState ( ) {
6163 return {
62- open : false ,
64+ open : this . props . openImmediately ,
6365 selectedIndex : this . _isControlled ( ) ? null : ( this . props . selectedIndex || 0 ) ,
6466 muiTheme : this . context . muiTheme ? this . context . muiTheme : ThemeManager . getMuiTheme ( DefaultRawTheme ) ,
6567 } ;
You can’t perform that action at this time.
0 commit comments