Well done!
export function searchButton_click(event, $w) {
$w("#trainingDataset").setFilter(wixData.filter()
.contains("ppl", $w("#myDropdown1").value)
.contains("muscleGroup", $w("#myDropdown2").value)
.contains("exerciseType", $w("#myDropdown3").value)
.contains("equipmentType", $w("#myDropdown4").value))
.then((results) => {console.log("Data Is Now Filtered: ");
console.log(results.items)
$w("#listRepeater").data = results.items;
})
.catch((err) => {console.log(err);});
$w("#listRepeater").expand();
}
TypeError: Cannot read property 'items'ofundefined
Results not ready at this moment?
What do you get for: console.log(results.items)
Accepted-REPEATER-DATA-FORMAT =
[
{
"_id": "1",
"firstName": "John",
"lastName": "Doe",
},
{
"_id": "2",
"firstName": "Jane",
"lastName": "Doe",
}
]
Compare your CONSOLE-OUTPUT with this data-format.
Use the google-chrome-CONSOLE instead of the integrated Wix-CONSOLE.
(Press F-12 and navigate to CONSOLE).