fix long names in columns (ellipsis-cell class) (#1775)

This commit is contained in:
Denys Vuika
2017-03-28 09:47:01 +01:00
committed by Eugenio Romano
parent a58dcca269
commit 2f2513ced9
2 changed files with 7 additions and 14 deletions

View File

@@ -14,7 +14,6 @@
:host .data-cell { :host .data-cell {
cursor: default; cursor: default;
} }
:host .cell-value {}
:host .column-header { :host .column-header {
cursor: pointer; cursor: pointer;
@@ -35,17 +34,13 @@
width: 100%; width: 100%;
} }
:host .ellipsis-cell > div
{ :host .ellipsis-cell .cell-container {
position: relative; height: 1em;
overflow: hidden;
/*height: 1em;*/
} }
/* visible content */ /* visible content */
:host .ellipsis-cell > div > span :host .ellipsis-cell .cell-value {
{
display: block; display: block;
position: absolute; position: absolute;
max-width: 100%; max-width: 100%;
@@ -57,15 +52,13 @@
/* cell stretching content */ /* cell stretching content */
:host .ellipsis-cell > div:after :host .ellipsis-cell > div:after {
{
content: attr(title); content: attr(title);
overflow: hidden; overflow: hidden;
height: 0; height: 0;
display: block; display: block;
} }
/* Utils */ /* Utils */
:host .non-selectable { :host .non-selectable {

View File

@@ -70,7 +70,7 @@
(dblclick)="onRowDblClick(row, $event)" (dblclick)="onRowDblClick(row, $event)"
[context-menu]="getContextMenuActions(row, col)" [context-menu]="getContextMenuActions(row, col)"
[context-menu-enabled]="contextMenu"> [context-menu-enabled]="contextMenu">
<div *ngIf="!col.template"> <div *ngIf="!col.template" class="cell-container">
<div *ngSwitchCase="'image'" class="cell-value"> <div *ngSwitchCase="'image'" class="cell-value">
<i *ngIf="isIconValue(row, col)" class="material-icons icon-cell">{{asIconValue(row, col)}}</i> <i *ngIf="isIconValue(row, col)" class="material-icons icon-cell">{{asIconValue(row, col)}}</i>
<img *ngIf="!isIconValue(row, col)" <img *ngIf="!isIconValue(row, col)"
@@ -89,7 +89,7 @@
<!-- empty cell for unknown column type --> <!-- empty cell for unknown column type -->
</span> </span>
</div> </div>
<div *ngIf="col.template"> <div *ngIf="col.template" class="cell-container">
<template ngFor [ngForOf]="[{ data: data, row: row, col: col }]" [ngForTemplate]="col.template"></template> <template ngFor [ngForOf]="[{ data: data, row: row, col: col }]" [ngForTemplate]="col.template"></template>
</div> </div>
</td> </td>