-
diff --git a/projects/angular/components/ui-suggest/src/ui-suggest.component.spec.ts b/projects/angular/components/ui-suggest/src/ui-suggest.component.spec.ts
index b152dc0d1..54512b9b4 100644
--- a/projects/angular/components/ui-suggest/src/ui-suggest.component.spec.ts
+++ b/projects/angular/components/ui-suggest/src/ui-suggest.component.spec.ts
@@ -1456,7 +1456,7 @@ const sharedSpecifications = (
discardPeriodicTasks();
}));
- it('should NOT be able to remove chip if readonly', fakeAsync(() => {
+ it('should NOT show remove button if chip is readonly', fakeAsync(() => {
const items = component.items!.slice(0, 3);
component.value = items;
component.readonly = true;
@@ -1466,19 +1466,7 @@ const sharedSpecifications = (
const initialChips = fixture.debugElement.queryAll(By.css('.mat-chip'));
expect(initialChips.length).toBe(3);
- const chipRemoveButton = getNativeElement(initialChips[1].query(By.css('button')));
- chipRemoveButton.click();
-
- fixture.detectChanges();
- tick(5000);
-
- const updatedChips = fixture.debugElement
- .queryAll(By.css('.mat-chip span'))
- .map(el => getNativeElement(el));
-
- expect(updatedChips.length).toEqual(3);
- expect(updatedChips.map(chip => chip.innerText)).toEqual(items.map(item => item.text));
-
+ expect(initialChips[1].query(By.css('button'))).toBeFalsy();
discardPeriodicTasks();
}));
});
diff --git a/projects/angular/components/ui-suggest/src/ui-suggest.component.ts b/projects/angular/components/ui-suggest/src/ui-suggest.component.ts
index 7297f9bfb..1a7670527 100644
--- a/projects/angular/components/ui-suggest/src/ui-suggest.component.ts
+++ b/projects/angular/components/ui-suggest/src/ui-suggest.component.ts
@@ -331,7 +331,7 @@ export class UiSuggestComponent extends UiSuggestMatFormFieldDirective
!this.isOpen &&
this._hasValue
) {
- return this._getValueSummary();
+ return this._getValueSummary(true);
}
return null;
@@ -1719,11 +1719,12 @@ export class UiSuggestComponent extends UiSuggestMatFormFieldDirective
});
}
- private _getValueSummary() {
- return (this.displayValueFactory ?? this._defaultDisplayValueFactory)(this.value);
+ private _getValueSummary(fromTooltip = false) {
+ return (this.displayValueFactory ?? this._defaultDisplayValueFactory)(this.value, fromTooltip);
}
- private _defaultDisplayValueFactory = (value?: ISuggestValue[]) => (value ?? []).map(v => this.intl.translateLabel(v.text)).join(', ');
+ private _defaultDisplayValueFactory = (value?: ISuggestValue[], fromTooltip = false) =>
+ (value ?? []).map(v => this.intl.translateLabel((fromTooltip && v.tooltip) || v.text)).join(', ');
private _cantNavigate(increment: number) {
return (!this.items.length &&
diff --git a/projects/angular/package.json b/projects/angular/package.json
index 34643a748..c0f38b575 100644
--- a/projects/angular/package.json
+++ b/projects/angular/package.json
@@ -1,6 +1,6 @@
{
"name": "@uipath/angular",
- "version": "14.8.7",
+ "version": "14.8.8",
"license": "MIT",
"author": {
"name": "UiPath Inc",