[英]ngx-datatable column header tooltip gets cut off
<ngx-datatable-column [width]="24"
[sortable]="true"
[canAutoResize]="false"
[draggable]="false"
[resizeable]="false"
[headerCheckboxable]="true"
[checkboxable]="true">
</ngx-datatable-column>
<ngx-datatable-column name='Name' prop='formattedStudentName' [width]="400" [cellClass]="'se-list-item'">
<ng-template let-column="column" ngx-datatable-header-template>
<ng-container>
<div ngbTooltip="Click on the word 'Name' to change the sort direction of the student list">
{{column.name}}
</div>
</ng-container>
</ng-template>
<ng-template let-value="value" let-row="row" ngx-datatable-cell-template>
<div>
<a href="#" (click)="!!onNameClicked(row)">{{value}}</a>
</div>
</ng-template>
</ngx-datatable-column>
這是我的代碼的一部分。 我需要對列標題使用ngbTooltip,但該指針在工作時會被數據表切斷。 如何防止它被切斷?
<ngx-datatable-column name='Name' prop='formattedStudentName' [width]="400" [cellClass]="'se-list-item'">
<ng-template let-column="column" ngx-datatable-header-template>
<ng-container>
<div container="body" ngbTooltip="Click on the word 'Name' to change the sort
direction of the student list">
{{column.name}}
</div>
</ng-container>
</ng-template>
<ng-template let-value="value" let-row="row" ngx-datatable-cell-template>
<div>
<a href="#" (click)="!!onNameClicked(row)">{{value}}</a>
</div>
</ng-template>
</ngx-datatable-column>
通過使用工具提示將container =“ body”添加到div,它可以使工具提示窗口彈出ngx-datatable的邊界。
旁注:在我的研究中,我發現可以為ngbTooltip添加tooltipClass =“ className”來自定義工具提示窗口。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.