Hello, can someone please write an example code of a search bar that has a limit of 4 items to display, and onClick “load more” show more results on the same page (not next page) ? thanks
My code now is
export function searchbutShop_click(event) {
wixData.query(‘Stores/Products’)
.contains(‘name’,$w(“#Searchbar”).value)
.or(wixData.query(‘Stores/Products’).eq (‘sku’,$w(“#Searchbar”).value))
.find()
.then(res => {
$w(‘#Repeater1’).data = res.items;
if (res.length === 0) {
$w(‘#Text1’).show();
$w(‘#Loadmorebutton’).hide();
} else {
$w(‘#Text1’).hide()
}
});
}
up