4 Checkbox group to filter a repeater

Hi all, I want to create a recipe page with 3 different checkbox groups for different filters.

Currently, I have 1 checkbox group and linked it to a repeater.

Could anyone assist in guiding me on how to add 2 more checkbox groups to the repeater?

I went digging online but have yet to find a solution

Here is the code that i found online:

import wixData from ‘wix-data’ ;

const databaseName = ‘Recipes1’ ;
const databaseField = ‘tags’ ;

$w.onReady( function () {

$w( '#checkboxGroup1' ).onChange((event) => { 

const selectedBox = $w( ‘#checkboxGroup1’ ).value;
addItemstoRepeater(selectedBox);
}
)}
);

function addItemstoRepeater(selectedOption = ) {

let dataQuery = wixData.query(databaseName);

if (selectedOption.length > 0 ) {
dataQuery = dataQuery.hasSome(databaseField, selectedOption);
}

dataQuery 
    .find() 
    .then(results => { 

const filtereditemsReady = results.items;
$w( ‘#repeater1’ ).data = filtereditemsReady;

    }) 

}

Here you will get all the information you need to make your wishes comes true.
https://www.media-junkie.com/pflegeservice

@russian-dima Thank you! I will check it out

Here’s an example using two checkbox groups to get you started: Example: Multiple Groups Filter

Thank you for your reference, however, for the checkbox, i wish to leave it unchecked by default and repeater will show the full list without filtering. When check box is checked, then repeater will then filter the results.

Appreciate your guidance

@tjunwei19 You asked for an example with multiple checkbox groups for filtering and that’s what the example demonstrates. You can default to full list without filtering by changing the code.

Hi Yisrael,

How would you default it to the full list?
I’ve also been trying different codes from the Velo forum and Example trying to achieve the same type of filter as the one in the built in wix store filter, but nothing seems to work.

So you still did not find a solution ?
Check this post…
https://www.wix.com/velo/forum/coding-with-velo/use-of-or

@megmortalwinlive
You recieved a MAIL !