mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Name column fixes (#6904)
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
"application": {
|
||||
"storagePrefix": "ADF",
|
||||
"name": "Alfresco ADF Application",
|
||||
"copyright": "© 2016 - 2018 Alfresco Software, Inc. All Rights Reserved."
|
||||
"copyright": "© 2016 - 2021 Alfresco Software, Inc. All Rights Reserved."
|
||||
},
|
||||
"search": {
|
||||
"filterWithContains": true,
|
||||
|
@@ -44,6 +44,9 @@ export class NameColumnComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
context: any;
|
||||
|
||||
@Input()
|
||||
key = 'name';
|
||||
|
||||
displayText$ = new BehaviorSubject<string>('');
|
||||
node: NodeEntry;
|
||||
|
||||
@@ -73,7 +76,8 @@ export class NameColumnComponent implements OnInit, OnDestroy {
|
||||
this.node = this.context.row.node;
|
||||
|
||||
if (this.node && this.node.entry) {
|
||||
this.displayText$.next(this.node.entry.name || this.node.entry.id);
|
||||
const displayText = this.context.row.getValue(this.key);
|
||||
this.displayText$.next(displayText || this.node.entry.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -266,7 +266,7 @@
|
||||
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
|
||||
[formatTooltip]="getNodeNameTooltip">
|
||||
<ng-template let-context>
|
||||
<adf-name-column [context]="context"></adf-name-column>
|
||||
<adf-name-column key="name" [context]="context"></adf-name-column>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
<data-column
|
||||
|
Reference in New Issue
Block a user