Skip to content

Commit

Permalink
Merge pull request smeup#2090 from smeup/fix/data-table/overflow
Browse files Browse the repository at this point in the history
fix / fixed table overflow
  • Loading branch information
lucafoscili authored Oct 1, 2024
2 parents c86bf57 + c9b4bbd commit 1a80e33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5980,8 +5980,7 @@ export class KupDataTable {
this.tableHeight === undefined &&
this.tableWidth === undefined,

'custom-size':
this.tableHeight !== undefined || this.tableWidth !== undefined,
'custom-size': !!this.tableHeight || !!this.tableWidth,

'border-top': !this.showHeader,
};
Expand All @@ -5991,14 +5990,15 @@ export class KupDataTable {
tableClass[`density-${this.density}`] = true;
tableClass[`fontsize-${this.fontsize}`] = true;

if (this.tableHeight && this.tableHeight !== '100%') {
if (this.tableHeight) {
elStyle = {
...elStyle,
height: this.tableHeight,
overflow: 'auto',
};
}

if (this.tableWidth && this.tableWidth !== '100%') {
if (this.tableWidth) {
elStyle = {
...elStyle,
width: this.tableWidth,
Expand Down Expand Up @@ -6033,7 +6033,7 @@ export class KupDataTable {
}

let belowClass = 'below-wrapper';
if (this.tableHeight !== undefined || this.tableWidth !== undefined) {
if (!!this.tableHeight || !!this.tableWidth) {
belowClass += ' custom-size';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,6 @@ th.obj:hover span:not(.overlay-action) {
}
}

@media (max-width: 500px) {
.actions-wrapper {
flex-direction: column-reverse;
}
}

:host([legacy-look]) {
th .header-cell__content {
font-family: var(--kup_datatable_font_family_monospace);
Expand Down

0 comments on commit 1a80e33

Please sign in to comment.