Filter and hide text for FAQ

@denniscelenlifepowr I can see on your page, that you have 2 types of filters:

  1. userType - where only one option is allowed and the filter should be .eq()

  2. region - where multi-slection is allowed and the filter should be hasSome(). I don’t know why you have this filter twice.
    Anyway, you should not let the user select both options in the userType filter.
    What you should do there is something like:

$w('#userTypeSelectionTags').onChange(event => {
let value = event.target.value;
if(value.length){
value = value.reverse()[0];//here you keep only the value f the last selection.
event.target.value = [value];//here you update the selection tags value
}
//then run the filter with the value by calling the runFilter() function
})

The filter itself should be something like:

function runFilter(){
let filter = wixData.filter();
const userType = $w('#userTypeSelectionTags').value;
if(userType.length){
filter = filter.eq('userType', userType[0]);
})
const region = $w('#regionSelectionTags').value;
if(region.length){
filter = filter.hasSome('userType', region )
}
$w('#dataset').setFilter(filter);
}

And of course you can add a search input and use onInput to make a filter as well.