I’ve read all of the other posts on here regarding search box and drop down filter a database result to a repeater. I have done this where the results show up on a table with success, but for some reason I am having issues accomplishing this with the repeater. I will post what I have, perhaps I have overlooked something.
import wixData from ‘wix-data’;
let originalPropertiesInfo = [];
export function button1_click(event, $w) {
//Add your code for this event here:
wixData.query(‘jobs’)
.contains(‘company’, $w(‘#searchbox’).value)
.or(wixData.query(‘jobs’)
.contains(‘jobTitle’, $w(‘#searchbox’).value))
.or(wixData.query(‘jobs’)
.contains(‘neighborhood’, $w(‘#searchbox’).value))
.or(wixData.query(‘jobs’)
.contains(‘hours’, $w(‘#searchbox’).value))
.or(wixData.query(‘jobs’)
.contains(‘description’, $w(‘#searchbox’).value))
.find()
.then(results => {
originalPropertiesInfo = results.items;
$w(‘#repeater2’).data = originalPropertiesInfo;
});
}
The idea is to be able to search a job board by filtering by city and then searching by keyword. I haven’t attempted to code the dropdown search yet because I’m still trying to figure out why my searchbox won’t work. Thank you.