ngx-datatable 列 header 工具提示被截断
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>
这是我的代码的一部分。我需要为列 header 使用 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 它允许工具提示 window 弹出 ngx-datatable 的边界。
旁注:在我的研究中,我发现对于 ngbTooltip,您可以添加 tooltipClass="className" 来自定义工具提示 window.
<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>
这是我的代码的一部分。我需要为列 header 使用 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 它允许工具提示 window 弹出 ngx-datatable 的边界。
旁注:在我的研究中,我发现对于 ngbTooltip,您可以添加 tooltipClass="className" 来自定义工具提示 window.