How to change checkbox group filter setting condition of 'is' to 'contains'?

I not that good in coding and for this also I referred a youtube video which worked perfectly,

here is my code

 
const databaseName = 'Courses';
const databaseField = 'coursePrice';
 
$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('#repeater3').data = filtereditemsReady;
 
 })
}

Just want to know how should I change the filter condition of ‘is’ to ‘contains’ as in the dropdown filter option (which is in editor itself)?

1 Like