This is an automated email from the ASF dual-hosted git repository. hshpak pushed a commit to branch fix/DATALAB-2955/scope-of-bugs-for-view-list-of-filtered-images in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
commit ec256033ab3f578c56cec426dd55e667dbe25885 Author: Hennadii_Shpak <[email protected]> AuthorDate: Tue Aug 9 16:02:04 2022 +0300 fixed normalize-dropdown pipe --- .../normalize-dropdown-multi-value.pipe.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-dropdown-multi-value/normalize-dropdown-multi-value.pipe.ts b/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-dropdown-multi-value/normalize-dropdown-multi-value.pipe.ts index 370b0e8b0..a326cf342 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-dropdown-multi-value/normalize-dropdown-multi-value.pipe.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/pipes/normalize-dropdown-multi-value/normalize-dropdown-multi-value.pipe.ts @@ -22,10 +22,13 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'normalizeDropdownMultiValue' }) export class NormalizeDropdownMultiValuePipe implements PipeTransform { - transform(value: string[], meaninglessValue: string = ''): string { - if (!value.length) { + transform(value: string[] | string, meaninglessValue: string = ''): string { + if (!value) { return ''; } + if (typeof value === 'string') { + return value; + } const filteredList = value.filter(item => item !== meaninglessValue); const [firstValue] = filteredList; if (filteredList.length === 1) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
