I want to apply several filters to my dataset, so that the visitor to my website can find their ideal cell phone. This is achieved thanks to various selections made by the user, either in dropdowns or in selection tags. The problem is that they filter independently; when they select the brand of the phone in the Selections tags, several results appear based on that brand, but when I want to continue filtering to find phones that are cheap (based on the choices made in a Dropdown), cheap phones appear, but of any brand. What I'm looking for is that the visitor selects a brand of cell phones and sees the cheap options of that specific brand. Any query, more than welcome, I am not the most skillful with words. Thank you!
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Hello Benjamin,
for your project you will need something like this one...
import wixData from 'wix-data'; export function mySelectionTags_change(event) { let selectedTags = $w("#mySelectionTags").value; // Define an empty filter let filter = wixData.filter(); if (selectedTags) { // Build a filter that only includes items with all selected tags filter = filter.hasAll("tags", selectedTags); } $w('#myDataset').setFilter(filter); }
...if you are working with "Selection-Tags"