Relatively new at programming. I started this summer trying to get a drop down menu to work using the repeater on Wixs but I am still stuck. Can someone offer me some instruction?
I have created the following code:
import wixData from ‘wix-data’;
$w.onReady( function () {
//TODO: write your page related code here…
});
export function dropdown1_change(event) {
let searchBusinessProfessional = $w(“#dropdown1”).value;
$w(“#dataset1”).setFilter(wixData.filter().contains(“businessProfessional”, searchBusinessProfessional));
}
export function dropdown2_change(event) {
let filterStore = $w(“#dropdown2”).value;
$w(“#dataset1”).onReady( () => {
let filter = wixData.filter();
if (filterStore === “Georgia”) {
filter = filter.eq(“georgia”, true );
}
if (filterStore === “New York”) {
filter = filter.eq(“newYork”, true );
}
if (filterStore === “Florida”) {
filter = filter.eq(“florida”, true );
}
if (filterStore === “South Carolina”) {
filter = filter.eq(“southCarolina”, true );
}
$w(“#dataset1”).setFilter(filter)
.then(() => {
$w(“#repeater1”).expand();
})
}
)
$w(“#repeater1”).expand();