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:
Denys Vuika
2026-02-27 13:05:53 +00:00
parent a5090807c0
commit 813d9ad3a9
@@ -18,14 +18,15 @@
import { Node } from '@alfresco/js-api'; import { Node } from '@alfresco/js-api';
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { CommonModule } from '@angular/common'; import { AsyncPipe } from '@angular/common';
@Component({ @Component({
selector: 'adf-node-path-column', selector: 'adf-node-path-column',
imports: [CommonModule], imports: [AsyncPipe],
template: ` template: `
<span class="adf-user-name-column adf-datatable-cell-value" title="{{ displayText$ | async }}"> @let text = displayText$ | async;
{{ displayText$ | async }} <span class="adf-user-name-column adf-datatable-cell-value" title="{{ text }}">
{{ text }}
</span> </span>
`, `,
host: { class: 'adf-node-path-column adf-datatable-content-cell' } host: { class: 'adf-node-path-column adf-datatable-content-cell' }