import wixData from "wix-data";
$w.onReady(async() => {
// Runs a query on the "sports" collection
wixData.query("HS_Sports_Schedule")
// Query the collection for any items whose "sports" field contains
// the value the user selected in the dropdown
.contains("sports", $w("#HSSchedule").value) //<----Line 10//
.find() // Run the query
.then(res => {console.log(res.items)
// Set the table data to be the results of the query
$w("#repeater2").data = res.items
});
});
If you don’t put them INSIDE the onReady… so it won’t trigger when the page is loaded…