Checklist Beginner

@mordyeps Is this the full code you have for the page? If you’re following this example you’re missing some key elements, such as the .then() and importing the wix-data module.

This is the full example code that you should modify to your element IDs:

import wixData from 'wix-data';

$w.onReady(function () {
    filterView();

    $w("#checkboxGroup1").onChange( (event, $w) => {
      filterView();
    });

    $w("#checkboxGroup2").onChange( (event, $w) => {
      filterView();
    });
});

function filterView(){
 var typeFilter = $w("#checkboxGroup1").value
 var lightFilter = $w("#checkboxGroup2").value
 
    console.log('type', typeFilter);
    console.log('light', lightFilter);
 
    $w("#dataset1").setFilter( wixData.filter()
    .hasSome("type", typeFilter)
    .hasSome("light", lightFilter)
    )

    .then( () => {
 let count = $w("#dataset1").getTotalCount(); 
 if(count === 0){
                $w("#group1").show();
            }else{
                $w("#group1").hide();
            }
    } )
    .catch( (err) => {
    console.log(err);
    } );
}