Search Box for data collection connected to Repeater

Hi everyone,
I was using the video tutorial (How to create a Search for Your Database) and some posts in the forum but I still haven’t be able to find whats wrong with the code.

This is the code:

import wixData from “wix-data”;

export function iTitle_keyPress(event) {
console.log($w(‘#iTitle’).value)
filter($w(‘iTitle’).value);
}

function filter(nome){
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘nomeTexto’, nome));
}

When I test the search box in the preview, nothing happens. I can write no errors are retrieved, but the repeater won’t display the relevant info. Just the full database collection.

Thank you in advance for any insight you may have!
PS - I have almost zero skills in programming. Just following the tutorials.

Hi Bruno,

It seems you are missing an ‘#’ in line 5 when referencing the element’s Id.
try changing:
filter($w(‘iTitle’).value)
to
filter($w(‘#iTitle’).value)

Best of luck!