Hide Table until Search is done then display

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;
});
}

export function button1_click(event) {
//Add your code for this event here:
}

Hi,
Your assumption is right and the code looks fine.

I suggest that you try adding:

$w('#table1').show();

right after the line

$w('#table1').rows = res.items;

for more details, see here:

Hey Ohad. Thank you so much. Some great guys on here!!! :slight_smile: