Filter a repeater with a single drop down

Hi There,
Thanks for taking a look at this.
Here’s the page in question: https://www.goanovia.com/search

I’ve been trying unsuccessfully to follow the limited help files on how to do this but found it a bit vague (Velo Tutorial: Adding Collection Data Search Functionality | Help Center | Wix.com). I’ve also combed other discussions, but couldn’t find a case exactly like mine.

I have a basic database collection and each entry has a state field. The page presently displays all entries in the database collection by default when the page loads. I’m wanting the drop down to enable users to then be able to select one of the states listed, and have the results refresh to filter out all states but the one they have selected.

Sounds simple, but just can’t get it to work.

Any help would be greatly appreciated!

import wixData from “wix-data”;

$w.onReady( function () {
$w(“#repeater1”).onItemReady(($w, itemData) => {
$w(“#image1”).src = itemData.image;
$w(“#text32”).text = itemData.title;
$w(“#text43”).text = itemData.phonenumber;
$w(“#text42”).text = itemData.address;
$w(“#text33”).text = itemData.testimonial;
$w(“#text40”).text = itemData.website;
$w(“#text39”).text = itemData.socialmedia;
$w(“#button2”).link = itemData.mapurl;
});
});

export function dropdown1_change(event, $w) {
// Runs a query on the “AnoviaBusinesses” collection
wixData.query(“AnoviaBusinesses”)
// Query the collection for any items whose “Name” field contains
// the value the user selected in the dropdown
.contains(“State”, $w(“#dropdown1”).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(“#repeater1”).rows = res.items;
});

}

Hello good evening!!
is this works??