Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui/project_form: Improve file handling in UI #1036

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jayanth-kumar-morem
Copy link
Contributor

@jayanth-kumar-morem jayanth-kumar-morem commented Dec 20, 2023

  • 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 the selectedFiles array.

Fixes: #991

UI Updates

Screen.Recording.2023-12-21.at.2.30.50.AM.mov

@tdruez
Copy link
Member

tdruez commented Jan 18, 2024

@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.

- 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 the `selectedFiles` array.

Fixes: nexB#991
Signed-off-by: Jayanth Kumar <jknani111@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inputs added with file picker are lost when creating a new project
2 participants