From 2e1ba122ebc819a6a2faa8cb67b61396104055a8 Mon Sep 17 00:00:00 2001
From: Theo Lesage <tlesage@teklia.com>
Date: Tue, 26 Mar 2024 13:17:52 +0000
Subject: [PATCH] Do not trim values in user configuration list fields

---
 .../Process/Workers/Configurations/Fields/ListField.vue     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/Process/Workers/Configurations/Fields/ListField.vue b/src/components/Process/Workers/Configurations/Fields/ListField.vue
index 91d605a57..7b7e5fa60 100644
--- a/src/components/Process/Workers/Configurations/Fields/ListField.vue
+++ b/src/components/Process/Workers/Configurations/Fields/ListField.vue
@@ -96,7 +96,7 @@ export default defineComponent({
     cleanList () {
       if (Array.isArray(this.validatedList)) {
         return this.validatedList.filter((item) => {
-          return String(item).trim().length > 0
+          return String(item).length > 0
         })
       } else return []
     },
@@ -125,7 +125,7 @@ export default defineComponent({
     updateItem (i: number, newValue: string | number | boolean) {
       if (this.newList[i] === newValue) return
       // Do not keep the last valid value in the list if the field is emptied
-      if (!String(newValue).trim().length) {
+      if (!String(newValue).length) {
         (this.newList as (string | number | boolean)[]).splice(i, 1, newValue)
         this.itemError[i] = null
       }
@@ -134,7 +134,7 @@ export default defineComponent({
     },
     validateFields () {
       for (const [i, item] of this.newList.entries()) {
-        if (String(item).trim().length && FIELDS[this.field.subtype].validate !== undefined) {
+        if (String(item).length && FIELDS[this.field.subtype].validate !== undefined) {
           try {
             const validated = FIELDS[this.field.subtype].validate(item)
             this.itemError[i] = null
-- 
GitLab