From 05d7787f19ce3ca82ba96a0412a32d2e35e53d60 Mon Sep 17 00:00:00 2001 From: Andria Capai Date: Fri, 10 Nov 2023 15:47:27 +0100 Subject: [PATCH] rebase: rebase from develop and format Reviewed-by: andriacap --- .../form/datalist/datalist.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/GN2CommonModule/form/datalist/datalist.component.ts b/frontend/src/app/GN2CommonModule/form/datalist/datalist.component.ts index e6df8bcdf8..54f283848d 100644 --- a/frontend/src/app/GN2CommonModule/form/datalist/datalist.component.ts +++ b/frontend/src/app/GN2CommonModule/form/datalist/datalist.component.ts @@ -79,11 +79,11 @@ export class DatalistComponent extends GenericFormComponent implements OnInit, O // if(this.nullDefault){ // values.push() // } - if(this.nullDefault && !this.required){ - let obj = {} - obj[this.keyValue] = null - obj[this.keyLabel] = "-- Aucun --" - values.unshift(obj) + if (this.nullDefault && !this.required) { + let obj = {}; + obj[this.keyValue] = null; + obj[this.keyLabel] = '-- Aucun --'; + values.unshift(obj); } values = values // filter search @@ -147,7 +147,7 @@ export class DatalistComponent extends GenericFormComponent implements OnInit, O this.filteredValues.length === 1 && !(this.parentFormControl.value && this.parentFormControl.value.length) ) { - const val = this.nullDefault ? null :this.values[0][this.keyValue]; + const val = this.nullDefault ? null : this.values[0][this.keyValue]; this.parentFormControl.patchValue(this.multiple && !this.nullDefault ? [val] : val); }