Hi so I’m currently trying to create a search for a Wix database and make it a customer’s info appear on a table but every time I try doing it when I click the search button it won’t search anything and the table remains blank with nothing on it. I tried following different videos that had success in doing this but I tried fixing the code like 5 times already and I get the same result. I click search and nothing appears and nothing happens. Can someone please help me that would be amazing? I also will include the code down below. Thank you!!
import wixData from “wix-data”
export function button1_click(event) {
wixData.query( “Search” )
.contains( “title” , $w( “#input1” ).value)
.find()
.then(res => {
$w( “#table1” ).rows = res.items;
});
}
$w.onReady( function () {
$w( “#table1” ).columns = [{
“id” : “name” ,
“dataPath” : “title” ,
“label” : “Name” ,
“type” : “string” ,
}, {
“id” : “fname” ,
“dataPath” : “fatherName” ,
“label” : “Father Name” ,
“type” : “string” ,
}];
});