function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Varun Aggarwal 34Varun Aggarwal 34 

Indeterminate checkbox working in classic not in lightning.

Hello everyone! I have a requirement where I need to implement an "Indeterminate" checkbox based on child checkboxes values as shown below in the screenshot.
User-added image

Below is the sample code that I have written on my VF page to achieve this, which is working as per expectations. 

 <script>                          
                  for (let i = 0; i< 10; i++) {     
                      var bbtemp = document.getElementById(example).value;                            
                            var test = document.getElementById(temp);                          
                            if(bbtemp == "true"){
                              console.log('here indeterminate');
                              test.indeterminate = true;
                            }
                        }
                      </script>

BUT the problem is, this script is not working on LIGHTNING UI whereas its working on classic UI.



P.S-  lightningStylesheets="true" is already set in VF page.

         Available for Lightning Experience, Experience Builder sites, and the mobile app - True.

Please suggest some solution for this.
VinayVinay (Salesforce Developers) 
Hi Varun,

Try to check debug logs that should narrow down the issue.

Thanks,