Skip to content

Commit dd53316

Browse files
authored
Merge pull request #595 from youda97/table-skeleton
fix(table): skeleton state
2 parents 58bde3b + 3abf3b4 commit dd53316

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/table/table.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,14 @@ import { I18n } from "./../i18n/i18n.module";
215215
(dragstart)="columnDragStart($event, i)"
216216
(dragend)="columnDragEnd($event, i)"
217217
(click)="setIndex(i)">
218-
<span *ngIf="skeleton"></span>
219218
<div
220219
*ngIf="columnsResizable"
221220
class="column-resize-handle"
222221
(mousedown)="columnResizeStart($event, column)">
223222
</div>
224223
<button
225224
class="bx--table-sort"
226-
*ngIf="this.sort.observers.length > 0 && column.sortable"
225+
*ngIf="!skeleton && this.sort.observers.length > 0 && column.sortable"
227226
[attr.aria-label]="(column.sorted && column.ascending ? sortDescendingLabel : sortAscendingLabel) | async"
228227
aria-live="polite"
229228
[ngClass]="{
@@ -357,7 +356,7 @@ import { I18n } from "./../i18n/i18n.module";
357356
[attr.data-previous-value]="(model.rowsExpanded[i] ? 'collapsed' : null)"
358357
(click)="setExpandIndex($event)">
359358
<button
360-
*ngIf="model.isRowExpandable(i)"
359+
*ngIf="!skeleton && model.isRowExpandable(i)"
361360
class="bx--table-expand__button"
362361
[attr.aria-label]="expandButtonAriaLabel | async"
363362
(click)="model.expandRow(i, !model.rowsExpanded[i])">
@@ -384,8 +383,10 @@ import { I18n } from "./../i18n/i18n.module";
384383
[ibmDataGridFocus]="isDataGrid"
385384
[(columnIndex)]="columnIndex"
386385
(click)="setIndex(j)">
387-
<ng-container *ngIf="!item.template">{{item.data}}</ng-container>
386+
<span *ngIf="skeleton && i === 0"></span>
387+
<ng-container *ngIf="!skeleton && !item.template">{{item.data}}</ng-container>
388388
<ng-template
389+
*ngIf="!skeleton"
389390
[ngTemplateOutlet]="item.template" [ngTemplateOutletContext]="{data: item.data}">
390391
</ng-template>
391392
</td>

0 commit comments

Comments
 (0)