Skip to content

Commit

Permalink
Add support to handle suffix and prefix titleFieldArr in ReDBoxQueryL…
Browse files Browse the repository at this point in the history
…ookupDataService in VocabField
  • Loading branch information
alejandro-bulgaris-qcif committed Jul 2, 2024
1 parent 8d5f6cd commit aba2c78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion angular-legacy/shared/form/field-vocab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,16 @@ class ReDBoxQueryLookupDataService extends Subject<CompleterItem[]> implements C
title = `${title}${_.isEmpty(title) ? '' : this.titleFieldDelim}${titleVal}`;
}
});
}
} else {
// expecting a delim pair array, 'prefix', 'suffix'
_.forEach(this.titleFieldArr, (titleFld: string, idx) => {
const delimPair: any = this.titleFieldDelim[idx];
const titleVal = data[titleFld];
if (titleVal) {
title = `${title} ${titleVal}${delimPair.suffix}`;
}
});
}
}
return title;
}
Expand Down

0 comments on commit aba2c78

Please sign in to comment.