I’m looking for a way to display a “Search” result coming from a dropbox selection to preview on a gallery. I found an example in this forum were the results of the search were being shown in a table, however I want them to be displayed on a gallery. I modified the original code to display it on the gallery using “$w(”#gallery1").items = res.items;" However, this only displayed the names of the images, not the images themselves.
This is what I did:
import wixData from 'wix-data';
export function dropbox_onChange(event) {
$w.onReady(function () {
wixData.query('Collection')
.contains("type", $w("#dropbox").value)
.find()
.then(res => {
$w("#gallery1").items = res.items;
});
});
}
Any thoughts on what could be wrong?
Note: I did link the gallery’s images to the database images.