Hello,
I am seeing a very strange issue with a repeater in both my editor and my live site. I am populating the repeater with code using its data property. The data I populate the repeater with is the results of a search query. See the code here:
query.find().then( (results) => //run the query on the listings collection
{
var matchingListings = results.items; //get the array of items that match the query
numMatches = matchingListings.length; //get the number of listings that match the query
$w(‘#loadingBox’).collapse(); //collapse the loading box
if ( numMatches > 0 ) //if there is at least one listing that matches the query
{
$w(‘#listingsRepeater’).data = matchingListings; //set the repeater data
$w(‘#listingsRepeaterBox’).expand(); //expand the listings repeater box
}
else //if there are no listings that match the query
{
$w(‘#noMatchesBox’).expand(); //expand the no matches box
}
});
This allows me to search different terms and get different results, changing the data in the repeater. For whatever reason, I can only change the data in the repeater twice before the repeater disappears completely. If you go to https://www.reddyrealtor.com/search-for-a-home
and plug in “r” as the search term and hit search you can replicate the problem. It will work fine if you search it once, and then again, but the third time it will break. Please help if you know what the issue is! Thanks in advance!
-Eric