I need some coding recommendation to make my repeater return results from a drop down

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. I would love to get some coding recommendations specific to what I a showing below. Can anyone make any specific coding recommendations


to get my drop down to work correctly:

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(“#dataset1”).setFilter(filter)

.then(() => {

$w(“#repeater1”).expand();

})
}

It seems you are trying to create a multi filter?

Perhaps this tutorial may help you: https://codequeen.wixsite.com/multi-search

It is an ‘old’ tutorial with no video to it. But it should guide you in showing you how to creating a multi search function with multiple elements. (In this case, multiple dropdowns)

If this is not what you are looking for … and instead you are looking for conditional filtering for dropdowns, then I recommend this other tutorial: https://codequeen.wixsite.com/dropdown

(That last one does have a video)

I already put your dropdown one in previous post yesterday, however I think they are after somebody to help with their existing code etc as it seems they don’t want to change their code
https://www.wix.com/corvid/forum/community-discussion/need-help-getting-my-repeater-to-produce-results

Leroy, have a look at this previous post here, it should help you too.
https://www.wix.com/corvid/forum/community-discussion/help-with-multiple-dropdown-s-to-filter-a-dataset-and-populate-a-repeater-with-results-using-wix-code