Skip to content
This repository was archived by the owner on Jun 5, 2022. It is now read-only.
This repository was archived by the owner on Jun 5, 2022. It is now read-only.

onErase method doesn't clean array #162

Open
@salientknight

Description

@salientknight

When I click the X in the corner to remove an image the array then contains empty array elements and often keeps old files in the array.

I add an image and delete it (repeat) what I expect is to have an empty array. What I have instead is an 4 element array with two pictures and two empty elements.

I assume that I need to keep track of the pictures array myself, so normally I would filter the array based on the image name, but onDrop is passed is an empty array, so there is nothing to work with to clean up the array.

I plan on having more than one picture upload on the page, so I need to keep the array clean for processing and keep the indexes in tact so that images do not lose attachment to their instance. They each need to be collected separately because I need to add alt, caption, keywords etc...

This is what is passed to onDrop when you click the X
Screen Shot 2020-04-24 at 4 31 08 PM

This is what the array looks like after + - +- of images
Screen Shot 2020-04-24 at 4 29 44 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions