I am trying to make a filterable portfolio, so that when you click on some buttons it only shows you elements in the repeater (linked to a database) that have that particular boolean value set as true in the database.
However, only the first button (gamesButton) works, (I checked the console.log) the others don’t .
This is my set up:
And this is my code:
import wixData from 'wix-data';
export function gamesButton_click(event) {
console.log("filtering games")
$w("#dataset1").setFilter(wixData.filter().eq("games", true));
}
export function videoButton_click(event) {
console.log("filtering videos")
$w("#dataset1").setFilter(wixData.filter().eq("films", true));
}
export function designButton_click(event) {
console.log("filtering design")
$w("#dataset1").setFilter(wixData.filter().eq("design", true));
}
export function appButton_click(event) {
console.log("filtering apps")
$w("#dataset1").setFilter(wixData.filter().eq("apps", true));
}
export function pubButton_click(event) {
console.log("filtering pubs")
$w("#dataset1").setFilter(wixData.filter().eq("publications", true));
}
export function photoButton_click(event) {
console.log("filtering photos")
$w("#dataset1").setFilter(wixData.filter().eq("photo", true));
}
export function allButton_click(event) {
console.log("filtering all")
$w("#dataset1").setFilter(wixData.filter().eq("all", true));
}
Can someone help?