Need help with putting filter on search bar that is connected to the repeater

Hey everybody! I essentially know nothing when it comes to nay form of coding and was hoping I could get some answers as to what I’m doing wrong.

Right now this is what I have:


I believe I have everything set up correctly so far except the filter. The repeater is connected to the database. The title, NMLS#, Branch, Phone, and Email are all correctly connected to their corresponding data within the spreadsheet. All the data loads perfectly when I hit preview. The issue that is occurring now is that if I type any name into the search bar, all the of data on the page suddenly disappears which I’m assuming is because I have the filter setup incorrectly. My goal here is to simply search the people within the repeater based on heir names.

here is the coding I have:

import wixData from “wix-data”;

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

function filter(name) {
$w(‘#dynamicDataset’).setFilter(wixData.filter().contains(‘employeeName’, name));

}

If you could explain where I went wrong as if I’m a four year old that would be fantastic