Skip to content

🐛 fix(bal-file-upload): balRejectedFile event does not trigger for multiple files #1897

@XavierBlumbergBaloise

Description

@XavierBlumbergBaloise

Current Behavior

When a user uploads multiple 'invalid' files, balRejectedFile event only triggers for the first invalid file

Expected Behavior

I expect when multiple files are added, balRejectedFile event is triggered multiple times for all invalid files.
(OR: new feature: FileUploadRejectedFile can contain an array of files (File[]) instead of just 1 file, then it's sufficient to call the event once containing all the Files[] and Reasons[] affected)

Steps to Reproduce

  1. load multiple invalid files to bal-file-upload component
  2. only first invalid file is triggered by balRejectedFile event

Version

17.3.0

Browsers

Microsoft Edge

Device

Desktop

Code Reproduction URL

https://design.baloise.dev/?path=/story/components-form-fileupload--basic&globals=framework:react

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions