I have a table containing 100’s of records but want it hidden on load but displayed only once a search is done from a pull down box of selection.
I assume the table is marked ‘Hidden on Load’. But that could be were I am going wrong.
If that is TRUE the code for the Button search is below. I tried SHOW, but the table didn’t show. Must have put it in wrong place. Anyone advise?
==============================================================
$w.onReady(function () {
//TODO: import wixData from ‘wix-data’;
});
export function searchButton_onClick(event) {
wixData.query(‘TopSanta’)
.contains(‘airport’, $w(‘#selection1’).value)
.ascending(“airport”, “date”, “duration”)
.find()
.then(res => {
$w(‘#table1’).rows = res.items;
});
}