Hi guys
Have already:
I have my code to upload multiple images to a temporary gallery (from a single upload button) for people to preview before they submit the images to a gallery.
Need:
I'm trying to add an "image delete button" to remove the current image being viewed in the Temporary Gallery.
Something like:
export function imagedeletebutton_click(event, $w) {
let currentIndex = $w("#gallery1").currentIndex;
let item = $w("#gallery1").items[currentIndex].src;
item.remove();
}
Does anyone have any ideas?
Many thanks!
Thomas
Hi Thomas
It turns out there is a much easier way that will also refresh your repeater:
export function iconButton1_click(event, $w) { $w("#dataset1").remove() .then( () => { console.log("Done removing current item"); } ); }
I hope that works better :)