So I have this code right now: https://pastebin.com/82wxz8yt which allows users to load mp3 files from their computer to a draggable list using input. This created list looks something like this:
The files are added to the list by selecting the input
and using the Promise in the handleClick
function to load the files into the files
array that is created in the constructor in this.state
and then processed through a .map()
function and in an editable text input to display each file.name
.
My problem is that whenever I click the input again to add a new file the list resets and the old list pretty much gets deleted. My question is how can I add an extra button on the bottom or something that allows me to add extra files to the list without resetting the list?