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
I have been trying with different field in the database but result is the same. This is the corrected code:
import wixData from "wix-data";
export function iTitle_keypress(event,$w) { console.log($w('#iTitle').value); filter($w('#iTitle').value); } function filter(operacion) { $w('#dataset1').setFilter(wixData.filter().contains('operacion',operacion)); }
bad news. still not working.
From a glance you have a bug in your filter function
function filter(title) { $w('#dataset1').setFilter(wixData.filter() .contains('Tipo,title') //this ); }
it should be
.contains('Tipo', title)
import wixData from "wix-data";
export function iTitle_keypress(event, $w) { console.log($w('#iTitle').value); filter($w('#iTitle').value); } function filter(title) { $w('#dataset1').setFilter(wixData.filter().contains('Tipo,title')); }
I got this code from a wix video in youtube: https://www.youtube.com/watch?v=Hx7_8-lRsW0&t=269s
It happens that i have a similar scenario than the one shown in he video but the code won't work for me, i am only trying to use the portion of code related to a search with an input element. Since i am not a code expert by any means, I am confused with the part of contains('Tipo,title') my guess is that my problem is here somehow but i don´t know what it is for each of the two parameters in the "contains" command.