如何为ngx-datatable列标题实现工具提示

问题描述 投票:0回答:1

我正在尝试在ngx-datatable-column标头上显示简单的工具提示。是否可以在component.html中编写简单代码?

<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>

angular ngx-datatable
1个回答
0
投票

您可以使用ng-template设置标题和标题的工具提示:

<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.

© www.soinside.com 2019 - 2024. All rights reserved.