Repeater Data Not Displayed Visually

Hey there,

Recently one of my repeaters refused to display any data I pass to it, even a blank item ({_id: ‘randomText’}), I can see the items by reading the repeater’s data, but nothing is displayed in the UI as if it has no items at all!

Here’s the code where the repeater is populated:

$w('#savedAddresses').data = [];
const addresses = [];
settings.address.list.forEach(address => {
    let item = { _id: `address-${Math.floor(Math.random() *100000)}`, address: address, isDefault: false }
    if (item.address.formatted === settings.address.main.formatted) { item.isDefault = true }
    addresses.push(item);
});

addresses.sort((a, b) => {
    if (a.isDefault) { return -1 } else { return 0 }
})

console.log("Addresses before assigning:", addresses); // Printing an array of 1 item
$w('#savedAddresses').data = addresses;
console.log("Addresses after assigning:", $w('#savedAddresses').data); // Printing an array of 1 item

And here’s the printed item:

{
  "_id": "address-12473",
  "address": {
    "formatted": "address",
    "location": {
      "latitude": number,
      "longitude": number
    },
    "city": "city"
  },
  "isDefault": false
}

Any idea? Help is appreciated!
Ahmad

On my opinion your DATA-FORMAT differs from the data which is accepted by the repeater…

[ //<-------------
  {
    "_id": "1",
    "firstName": "John",
    "lastName": "Doe",
    "image": "http://someImageUrl/john.jpg"
  },
  {
    "_id": "2",
    "firstName": "Jane",
    "lastName": "Doe",
    "image": "http://someImageUrl/jane.jpg"
  }
] //<-------------

Right ?

Unfortunately, no! The schema is correct, the only required property is the ( _id ) property, you can add anything after that.

After contacting Wix support and running some tests, turns out it’s a bug somewhere in their component code, it wasn’t solved until this time though.