Skip to content

Commit ee6ae70

Browse files
committed
fix(cell): Apply ellipsis styling for cell text
1 parent a9cbaa5 commit ee6ae70

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/components/cell.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ export default class IgcGridLiteCell<T extends object> extends LitElement {
5656

5757
protected override render() {
5858
return html`${cache(
59-
this.column.cellTemplate ? this.column.cellTemplate(this.context as any) : html`${this.value}`
59+
this.column.cellTemplate
60+
? this.column.cellTemplate(this.context as any)
61+
: html`<span part="text">${this.value}</span>`
6062
)}`;
6163
}
6264
}

src/styles/body-cell/body-cell.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ $inset-shadow-width: #{rem(1px)};
3131
border-inline-end: none;
3232
}
3333

34+
[part~="text"] {
35+
text-overflow: ellipsis;
36+
overflow: hidden;
37+
white-space: nowrap;
38+
}
39+
3440
igc-input {
3541
position: absolute;
3642
left: 0;

0 commit comments

Comments
 (0)