File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ declare module '@salesforce/design-system-react/components/utilities/menu-list/i
55 className ?: any [ ] | Record < string , any > | string ;
66 checkmark ?: boolean ;
77 data ?: Record < string , any > ;
8+ disabled ?: boolean ;
89 divider ?: 'top' | 'bottom' ;
910 href ?: string ;
1011 id : string /*.isRequired*/ ;
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ class ListItem extends React.Component {
4242 ] ) ,
4343 checkmark : PropTypes . bool ,
4444 data : PropTypes . object ,
45+ disabled : PropTypes . bool ,
4546 divider : PropTypes . oneOf ( [ 'top' , 'bottom' ] ) ,
4647 href : PropTypes . string ,
4748 id : PropTypes . string . isRequired ,
@@ -136,7 +137,7 @@ class ListItem extends React.Component {
136137 EventUtil . trapImmediate ( event ) ;
137138 }
138139
139- if ( this . props . onSelect ) {
140+ if ( this . props . onSelect && ! this . props . disabled ) {
140141 this . props . onSelect ( this . props . index ) ;
141142 }
142143 } ;
You can’t perform that action at this time.
0 commit comments