I have the following code which works on preview:
export function deleteButton_click(event) {
//Add your code for this event here:
let item = $w("#dataset3").getCurrentItem();
wixData.remove("savedAddresses", item._id);
setTimeout (() => {
$w('#dataset3').refresh();
}, 200)
}
The button is inside the repeater box that should have the info deleted. It only doesn't work on live site for some reason.
Any help would be awesome!
Thanks!!!!
Issue was with permissions. Had who can delete as Admin only instead of site member.
Thank you!!!
So, it doesn’t work on live site? You may want to check your database permissions (who can delete, edit, etc the database).
Also, why can’t you just connect the button to the delete action? I think that should work without coding everything. Having everything aside from the button to be ready-only. Make the database read & write.