From 5f31d7ef2a33e30d4680fb1044b3593988db1099 Mon Sep 17 00:00:00 2001 From: Claudio Savino Date: Fri, 14 Apr 2023 11:01:01 +0200 Subject: [PATCH] feat: feat: #433 (File input append mode) Feat: #433 (File input append mode) fix #433 --- CHANGELOG.md | 4 ++++ src/Field.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eee0d59..f8af1515 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ +# 6.2.0 (master) +- Feat: #433 (File input append mode) + # 6.1.1 (master) - Fix: #624 (default() helpers) + # 6.1.0 (master) - Introduced `fallbackValue` and `retrieveNullifiedEmptyStrings` form options. - Fix: `get()` strict mode improved diff --git a/src/Field.ts b/src/Field.ts index 4fa12c47..8a063433 100755 --- a/src/Field.ts +++ b/src/Field.ts @@ -482,7 +482,10 @@ export default class Field extends Base implements FieldInterface { files = _.map(e.target.files); } - this.files = files || args; + this.files = [ + ..._.map(this.files), + ...(files || args) + ]; }) );