I am fetching some rows from a collection to populate a dropdown. The data fetch works but dropdown does not show any items. Does not go to the catch block either. No error in corvid. Dropdown is plain blank.
Here’s my code-
import wixData from ‘wix-data’;
$w.onReady( () => {
wixData.query(“Areas”)
.find()
.then( (results) => {
console.log(“Items fetched : " + JSON.stringify(results));
$w(”#dropdownareas")
.options
.push(…results.items.map(area => {
return {
“value”: area.areaId,
“label”: area.title
}
}));
})
. catch ( (err) => {
console.log("Error Occurred : " + err.message);
});
});