Skip to content

Commit f61a5f6

Browse files
authored
Do not show cell copy icon when the value is empty (eclipse-esmf#133)
1 parent 6d53319 commit f61a5f6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: src/ng-generate/components/table/generators/components/table-cell/files/__name@dasherize__.component.html.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div>
1414
<mat-icon
1515
(click)="copyToClipboard(value, $event)"
16-
*ngIf="!(value === null || value === undefined)"
16+
*ngIf="notEmptyValue"
1717
class="material-icons copy-to-clipboard"
1818
data-test="copy-to-clipboard-icon"
1919
>

Diff for: src/ng-generate/components/table/generators/components/table-cell/files/__name@dasherize__.component.ts.template

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export class EsmfTableCellComponent {
2424
return this.configs.find((config: Config) => config.name.includes('highlight'))?.selected;
2525
}
2626

27+
get notEmptyValue(): boolean {
28+
return this.value !== null && this.value !== undefined && this.value.trim() !== '-';
29+
}
30+
2731
constructor(private readonly clipboard: Clipboard) {}
2832

2933
copyToClipboard(value: any, event: MouseEvent): void {

0 commit comments

Comments
 (0)