I would really appreciate a little help with this, Ive been trying to fix for hours now and i’m so close!
I have 2 user input fields linking to a write only dataset. (songswrite)
I then have a repeater (songsList) to show all those comments linked to a read only dataset. (songsread)
On live site, the input fields work correctly and the data is in the live collection data. BUT the repeater shows nothing at all…
On preview everything works as it should but the data is in sandbox only.
How can I get the data to show from the live collection to the repeater?
Thank you!!
Heres the code I am using (from the wix tutorial video):
import wixData from ‘wix-data’;
function getData(){
let query = wixData.query(‘Songs’);
return query.limit(200).find().then(results => {
console.log(‘getData’, results);
return results.items;
});
}
$w.onReady( () => {
$w("#songswrite").onAfterSave( () => {
getData().then((items) => {
$w("#songsList").data = items;
});
});
});