I have a database search option on my page (search by name) with a table and the code is below. Query seems to work, but it returns no data to the table, the table turns blank. I have name data in the live database. Not sure why it returns blank date to the table. Am I missing something?
import wixData from ‘wix-data’;
//For full API documentation, including code examples visit http://wix.to/94BuAAs
$w.onReady(function () {
//TODO: import wixData from ‘wix-data’;
});
export function button1_click() {
wixData.query(‘GameData’)
.contains(‘name’, $w(‘#namesearch’).value)
.find()
.then(res => {
$w(‘#searchresults’).rows = res.items;
});
}