If someone could help with this please...
I have a simple page with a dropdown list and a gallery. User selects name from list and this is supposed to filter data collection and display images in gallery only belonging to that name.
This is my code which selects the name from the list but nothing happens in the gallery, it's just blank. Can anyone tell me what else I need please?
import wixData from 'wix-data';
$w.onReady(function () {});
export function memberdropdown_change(event, $w) {
let newmember = $w("#memberdropdown").value;
console.log(newmember);
//var memberId = $w('#membersdataset').getCurrentItem()._id;
//console.log(memberId);
$w('#photosdataset').setFilter(wixData.filter().eq('title', newmember));
$w('#gallery1').show;
}
Thanks Tal.
I had already watched that video tutorial a couple of times but it didn't really help as it was using repeaters rather than a gallery and focused more on the search bar than the dropdown list. But thanks for your input. I managed to get it sorted in the end.
Hi,
I recommend following this video tutorial to create a filter to your gallery.
Good luck!
Tal.