Skip to content

Commit fae69b4

Browse files
committed
Add tooltip to table cell only if value is not empty
1 parent 4d0ae60 commit fae69b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@
9696
</th>
9797

9898
<td data-test="table-cell"
99-
mat-cell *matCellDef="let row"
100-
[matTooltipDisabled]="<%= isEmptyValue %>"
99+
mat-cell
100+
*matCellDef="let row"
101101
<% if(options.templateHelper.isEnumPropertyWithEntityValues(value.property)) { %>
102-
[matTooltip]="!(<%= isEmptyValue %>) ? (row.<%= cellPropertyPath %><%= descriptionPipe %>:true<%= language %>) : ''"
102+
<%= !isEmptyValue ? '[matTooltip]="row.' + cellPropertyPath + descriptionPipe + ':true' + language + '"' : '' %>
103103
<% } else { %>
104-
[matTooltip]="<%= cellContent %>"
104+
<%= !isEmptyValue ? '[matTooltip]="' + cellContent + '"' : '' %>
105105
<% } %>
106106
<% if(options.templateHelper.isNumberProperty(value.property)) { %>
107107
class="table-cell-number"

0 commit comments

Comments
 (0)