Skip to content

Commit

Permalink
rebase: rebase from develop and format
Browse files Browse the repository at this point in the history
Reviewed-by: andriacap
  • Loading branch information
andriacap authored and amandine-sahl committed Jul 29, 2024
1 parent ce8ee7f commit 05d7787
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 05d7787

Please sign in to comment.