Reputation: 59
Im trying to showup simple tooltips on my ngx-datatable-column header. Important is that I can still use the sort functionality.
Somehow "title" is not working.
<ngx-datatable-column title="my Tooltip" [resizeable]="false" [width]="50" name="Name" prop="key" headerClass="text-left">
Where I can integrate the title tag?
<ngx-datatable #table [rows]="rows" [reorderable]="false" columnMode="force" class="bootstrap table-bordered table-hover" [summaryRow]="true" [summaryPosition]="'bottom'" [loadingIndicator]="showLoadingIndicator" headerHeight="auto" rowHeight="auto" footerHeight="auto" summaryHeight="auto">
<ngx-datatable-column [resizeable]="false" [width]="50" name="Name" prop="key" headerClass="text-left">
<ng-template let-value="value" ngx-datatable-cell-template>
<a href="link" target="_blank" class="text-left">
{{value}}
</a>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
Upvotes: 2
Views: 2781
Reputation: 38134
You can use ng-template
to set header and tooltip for the header:
<ngx-datatable-column name="Part" headerClass="header" [title]="Hello"
[summaryFunc]="emptySumm">
<ng-template ngx-datatable-header-template let-column="column">
<span title="the tooltip">I am a tooltip</span>
</ng-template>
</ngx-datatable-column>
The complete example can be seen at stackblitz.
Upvotes: 3