Hi
I am love love loving this wix code!!!
How do I put an advanced search on my website, to search the tables on each of the pages separately?
I want it to automatically search as I type in the search bar - without having to click a button or push the enter key.
& not sure if this is possible, but I would really like it to automatically change the table without having to re-load the page.
So that it automatically refines the table, and if I delete certain keywords, the table automatically reverts back without having to reload the whole page.
I’ll be SOOOOOOOO grateful if someone could help me here…
Many thanks
Sarah
Hi !
I’m no expert, but I just discovered how to make a search as one types.
You just need to select the input , then add an “OnKeyPress” event that will trigger the wanted action.
In my case, this bit of code filters every item on the page that corresponds to what the user types in + the categories he chose via 2 dropdown buttons( categories and sellers)
import wixData from 'wix-data';
export function searchInput_keyPress(event, $w) {
$w("#dynamicDataset").setFilter(wixData.filter()
.contains("title", $w("#searchInput").value)
.contains("categorie", $w("#categorieInput").value)
.contains("vendeur", $w("#vendeurInput").value));
}