File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed 
packages/react/src/components/InlineCheckbox Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const InlineCheckbox = React.forwardRef(function InlineCheckbox(
3838    disabled, 
3939    id, 
4040    name, 
41-     onClick, 
41+     onClick :  onClick  ?  onClickCheckBoxInput  :  onClick , 
4242    onChange : ( evt )  =>  { 
4343      onChange ( evt . target . checked ,  id ,  evt ) ; 
4444    } , 
@@ -57,6 +57,14 @@ const InlineCheckbox = React.forwardRef(function InlineCheckbox(
5757    } 
5858  } ,  [ indeterminate ] ) ; 
5959
60+   function  onClickCheckBoxInput ( evt )  { 
61+     // If the previous "indeterminate" is true, change "checked" to false. If it is not undefined, we're working on `TableSelectAll` 
62+     if  ( indeterminate )  { 
63+       evt . target . checked  =  false ; 
64+     } 
65+     onClick ( evt ) ; 
66+   } 
67+ 
6068  return  ( 
6169    < div  className = { `${ prefix }  } > 
6270      < input  { ...inputProps }  /> 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments