top of page
filter wix gallery with selection tag
import wixData from 'wix-data';
$w.onReady(function () {
$w('#selectionTags1').onChange(() => {
const selectedTag = $w('#selectionTags1').value;
let filter = wixData.filter();
if (selectedTag.length > 0) {
filter = filter.hasSome("cuisine", selectedTag);
}
$w('#dataset1').setFilter(filter);
})
});
Copied!
bottom of page