Hello everyone,
I have an issue when displaying data from a collection into a table using drop downs.
The first drop down function is working but the second not:
Thank you in advance !
import wixData from “wix-data”
export function searchbutton_click(event)
{ //Add your code for this event here:
// Runs a query on the “recipes” collection wixData.query(“FindPartner”)
// Query the collection for any items whose “Name” field contains
// the value the user entered in the input element
.contains(“fullNameOrUsername”, $w(" #searchBox “).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(” #table ").rows = res.items;
}); }
export function dropdown1_change(event) {
//Add your code for this event here:
// Runs a query on the “recipes” collection
wixData.query(“FindPartner”)
// Query the collection for any items whose “Name” field contains
// the value the user selected in the dropdown
.contains(“activity”, $w(" #dropdown1 “).value)
.find() // Run the query .then(res => {
// Set the table data to be the results of the query
$w(” #table ").rows = res.items
});}
export function dropdown2_change(event) {
//Add your code for this event here:
// Runs a query on the “recipes” collection
wixData.query(“FindPartner”)
// Query the collection for any items whose “Name” field contains
// the value the user selected in the dropdown
.contains(“lookingForA”, $w(" #dropdown2 “).value)
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(” #table ").rows = res.items
});}