mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-8468] Remove string array from copyToClipboard
This commit is contained in:
+2
-1
@@ -5,11 +5,12 @@
|
||||
<mat-form-field
|
||||
class="adf-property-value"
|
||||
(dblclick)="copyToClipboard(property.displayValue)"
|
||||
[attr.data-automation-id]="'card-select-label-' + property.key"
|
||||
[attr.data-automation-id]="'card-select-field-' + property.key"
|
||||
[title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate"
|
||||
>
|
||||
<mat-label
|
||||
class="adf-property-label"
|
||||
[attr.data-automation-id]="'card-select-label-' + property.key"
|
||||
[ngClass]="{
|
||||
'adf-property-value-editable': isEditable,
|
||||
'adf-property-readonly-value': isReadonlyProperty
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ describe('CardViewSelectItemComponent', () => {
|
||||
component.ngOnChanges({});
|
||||
fixture.detectChanges();
|
||||
|
||||
testingUtils.doubleClickByDataAutomationId(`card-select-label-${component.property.key}`);
|
||||
testingUtils.doubleClickByDataAutomationId(`card-select-field-${component.property.key}`);
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith('Two', 'CORE.METADATA.ACCESSIBILITY.COPY_TO_CLIPBOARD_MESSAGE');
|
||||
|
||||
+1
-1
@@ -194,7 +194,7 @@ export class CardViewSelectItemComponent extends BaseCardView<CardViewSelectItem
|
||||
}
|
||||
}
|
||||
|
||||
copyToClipboard(valueToCopy: string | string[] | Observable<string>) {
|
||||
copyToClipboard(valueToCopy: string | Observable<string>) {
|
||||
if (this.copyToClipboardAction) {
|
||||
if (isObservable(valueToCopy)) {
|
||||
valueToCopy.pipe(take(1)).subscribe((value) => {
|
||||
|
||||
Reference in New Issue
Block a user