Hi
Any help is much appreciated here. I have a simple search box that I am using on a repeater, and it works, but in the console I am getting the following error repeating. I fear this is causing me performance issues as well as clearly being wrong.
Code for search is:
export function input1_keyPress(event, $w) {
//Search function in repeater
wixData.query(‘reports’)
// Query the collection for any items whose “Name” field contains
// the value the user entered in the input element
.contains(‘title’,$w(‘#input1’).value)
.or(wixData.query(‘reports’)
.contains(‘abstract’,$w(‘#input1’).value)
.or(wixData.query(‘reports’)
.contains(‘company’,$w(‘#input1’).value)
))
.find() // Run the query
.then(res => {
// Set the table data to be the results of the query
$w(‘#repeater2’).data = res.items;
});
}
Error that I am getting is:
Failed setting text: TypeError: undefined is not an object (evaluating ‘e.replace’)
Any ideas much appreciated.