mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
refactor: update node path column component for improved template syntax and performance
- Replaced CommonModule import with AsyncPipe for better performance. - Enhanced template syntax by using a variable for async value, improving readability and maintainability. [ci:force]
This commit is contained in:
+5
-4
@@ -18,14 +18,15 @@
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-node-path-column',
|
||||
imports: [CommonModule],
|
||||
imports: [AsyncPipe],
|
||||
template: `
|
||||
<span class="adf-user-name-column adf-datatable-cell-value" title="{{ displayText$ | async }}">
|
||||
{{ displayText$ | async }}
|
||||
@let text = displayText$ | async;
|
||||
<span class="adf-user-name-column adf-datatable-cell-value" title="{{ text }}">
|
||||
{{ text }}
|
||||
</span>
|
||||
`,
|
||||
host: { class: 'adf-node-path-column adf-datatable-content-cell' }
|
||||
|
||||
Reference in New Issue
Block a user