From 95b8833bf2d716842131f18da39f41e9820b771e Mon Sep 17 00:00:00 2001 From: Gery Hirschfeld Date: Thu, 14 Dec 2023 08:38:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(file-upload):=20switch=20lin?= =?UTF-8?q?es=20(#1236)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(file-upload): switch lines --- .changeset/many-bobcats-yell.md | 5 +++++ .../src/components/bal-file-upload/bal-file-upload.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/many-bobcats-yell.md diff --git a/.changeset/many-bobcats-yell.md b/.changeset/many-bobcats-yell.md new file mode 100644 index 0000000000..88c0c5a55d --- /dev/null +++ b/.changeset/many-bobcats-yell.md @@ -0,0 +1,5 @@ +--- +'@baloise/design-system-components': patch +--- + +Trigger the `balFilesAdded` event of the `bal-file-upload` component after files have been added. diff --git a/packages/components/src/components/bal-file-upload/bal-file-upload.tsx b/packages/components/src/components/bal-file-upload/bal-file-upload.tsx index 369c91913f..e7b409d797 100644 --- a/packages/components/src/components/bal-file-upload/bal-file-upload.tsx +++ b/packages/components/src/components/bal-file-upload/bal-file-upload.tsx @@ -289,9 +289,9 @@ export class FileUpload implements FormInput, BalAriaFormLinking { } if (validatedFiles.validFiles.length > 0) { - this.balFilesAdded.emit(validatedFiles.validFiles) this.files = [...this.files, ...validatedFiles.validFiles] this.balChange.emit(this.files) + this.balFilesAdded.emit(validatedFiles.validFiles) } this.updateFileInput()