Please help, search bar

Thanks,

yes I had the on Key press already and fields all match also. This is what it looks like now and the if event now has a red dot by it. It says not defined. I deleted the rest of my code so the drop down no longer works.

import wixData from ‘wix-data’;

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

function filter(title) {
$w(‘#dataset1’).setFilter(wixData.filter().contains(‘locationTitle’, title));
}
if (event.key === ‘Enter’){
$w(“#dataset1”).setFilter( wixData.filter()
.contains(“locationTitle”, $w(“#iActivity”).value)
);
}