Hi wix team,
I have a repeater in mobile that i’m trying to populate but for some reason it doesn’t display the results properly. There is only one column before results and then 11 results when the code has run the database. It only happens on live mobile, works every time on Preview in the editor (I have synced the database)
Around 1 in 4 times the results displays this
But should display this
Here is the code:
$w.onReady(function () {
if(wixWindow.formFactor === "Desktop") {
fillRepeaterDesktop();
}
else{
fillRepeaterMobile();
}
});
function fillRepeaterMobile (){
$w('#text185').text = "Hillwalking";
wixData.query('CoursesCategory')
.ascending('order')
.find()
.then((results) => {
if (results.totalCount > 0) {
$w('#popularCoursesRepeater').data = results.items;
$w('#popularCoursesRepeater').onItemReady (($w, itemData, index) =>{
$w("#text185").text = itemData.title;
$w("#hikingImage").src = itemData.icon;
$w("#mobileButton").link= "/courses/"+encodeURI(itemData.title);
$w('#mobileButton').onClick((event) => {
$w('#text185').text = "Loading...";
})
});
}
})
$w('#mobileButton').show();
$w('#hikingImage').show();
}
Thank you!