I probably should have mentioned, you will need to add the ‘onKeyPress’ on the input bar through the properties panel, and then add the following code in between the curly brackets. Have you done it that way?
Then make sure the key (locationTitle) is the same as your database field key and the input’s id is the same as your input’s id ( iActivity ) in case I might have mis spelled it…
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)
);
}