scancode.io
scancode.io copied to clipboard
ui/project_form: Improve file handling in UI
- Enhance file input handling in the UI to avoid losing selected files when adding new inputs.
- Introduce a
selectedFiles
array to store and manage selected files. - Display selected files in the UI with additional features, including a delete button.
- Update the
removeFile
function to correctly remove files from both the UI and theselectedFiles
array.
Fixes: #991
UI Updates
https://github.com/nexB/scancode.io/assets/64846852/4d615d1a-1128-4633-9728-34153f6bc564
@jayanth-kumar-morem I've noticed an issue while reviewing this PR, to reproduce:
- Drag and drop a file into the form, then drag and drop it again. The file is duplicated in the list. Note that this does not happen with the "Click" to select file.