File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export interface MenuTriggerInputs<V> {
4949} 
5050
5151/** The inputs for the MenuItemPattern class. */ 
52- export  interface  MenuItemInputs < V >  extends  Omit < ListItem < V > ,  'index' >  { 
52+ export  interface  MenuItemInputs < V >  extends  Omit < ListItem < V > ,  'index'   |   'selectable' >  { 
5353  /** A reference to the parent menu or menu trigger. */ 
5454  parent : SignalLike < MenuPattern < V >  |  MenuBarPattern < V >  |  undefined > ; 
5555
@@ -635,13 +635,17 @@ export class MenuItemPattern<V> implements ListItem<V> {
635635  /** The submenu associated with the menu item. */ 
636636  submenu : SignalLike < MenuPattern < V >  |  undefined > ; 
637637
638+   /** Whether the menu item is selectable. */ 
639+   selectable : SignalLike < boolean > ; 
640+ 
638641  constructor ( readonly  inputs : MenuItemInputs < V > )  { 
639642    this . id  =  inputs . id ; 
640643    this . value  =  inputs . value ; 
641644    this . element  =  inputs . element ; 
642645    this . disabled  =  inputs . disabled ; 
643646    this . submenu  =  this . inputs . submenu ; 
644647    this . searchTerm  =  inputs . searchTerm ; 
648+     this . selectable  =  computed ( ( )  =>  ! this . submenu ( ) ) ; 
645649  } 
646650
647651  /** Opens the submenu. */ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments