Hi, I found this thread close to solving my issue. My case varies as follows;
I have dropdown filters run by velo code. This overwrites the filters set via dataset settings, whenever a dropdown option is selected. How do I maintain a boolean filter fixed always?
(I have many DD filters combined, I’ve shown only one below)
import wixData from 'wix-data';
$w.onReady(async function () {
await setupCountriesDropdown();
setupSubjectDropdown();
});
function setupSubjectDropdown() {
$w("#subjectDropdown").onChange(filterAndApply);
}
async function filterAndApply() {
let filter = wixData.filter();
const subject = $w("#subjectDropdown").value;
if (subject) {
filter = filter.ge("subjects", subject);
}
$w("#listingsDataset").setFilter(filter);
}