I need to filter the dynamic page in 2 ways, a first one that filters the data according to the user and the second one, which if selected the drop-down field, also filters them by category.
To do this I applied the filter in the dataset to filter the data based on the user who visits the page, then I wrote a filter to give the user the possibility to order the repeater as he wishes.
the user filter works, but when I select a different category then it reorders the data according to the category but the user filter is as if it disappeared showing me the data of all the filtered users.
This is not good because every user has to see his own, not those of others.
this is the category filter code, how can I tell him that you should only add to that of users and not replace it?
Thanks for help
function filterResults (cliente, category) {
var newfilter = wixData.filter();
newfilter = newfilter.eq('categoriaVideo',category);
$w('#dbAcquisti').setFilter(newfilter);
console.log(newfilter)
}
export function categorySelection_change(event) {
var allCategory;
if ($w('#iptCategorySelection').value !== 'all') {
allCategory = $w('#iptCategorySelection').value;
}
filterResults(allCategory)
}