class="btn btn-{{btnColor}}"
[ngClass]="{'disabled': disableSelectionAction(currentAction)}"
(click)="useClickAction(currentAction)"
+ [disabled]="disableSelectionAction(currentAction)"
[routerLink]="useRouterLink(currentAction)"
[attr.aria-label]="currentAction.name"
[preserveFragment]="currentAction.preserveFragment ? '' : null">
<i [ngClass]="[currentAction.icon]"></i>
- <span>{{ currentAction.name }}</span>
+ <span class="action-label">{{ currentAction.name }}</span>
</button>
</ng-container>
<div class="btn-group"
role="group"
*ngIf="dropDownActions.length > 1"
aria-label="Button group with nested dropdown">
- <button class="btn btn-{{btnColor}} dropdown-toggle-split"
+ <button aria-label="dropdown-menu-toggle"
+ class="btn btn-{{btnColor}} dropdown-toggle-split"
ngbDropdownToggle>
<ng-container *ngIf="dropDownOnly">{{ dropDownOnly }} </ng-container>
<span *ngIf="!dropDownOnly"
placement="bottom-right"
class="tc_filter_name">
<button ngbDropdownToggle
- class="btn btn-light">
+ class="btn btn-light"
+ title="Filter">
<i [ngClass]="[icons.large, icons.filter]"></i>
{{ selectedFilter.column.name }}
</button>
<i [ngClass]="[icons.search]"></i>
</span>
</span>
- <input class="form-control"
+ <input aria-label="search"
+ class="form-control"
type="text"
[(ngModel)]="search"
(keyup)="updateFilter()">
<div class="input-group-append">
<button type="button"
class="btn btn-light"
+ title="Clear"
(click)="onClearSearch()">
<i class="icon-prepend {{ icons.destroy }}"></i>
</button>
<!-- pagination limit -->
<div class="input-group dataTables_paginate"
*ngIf="limit">
- <input class="form-control"
+ <input aria-label="table pagination"
+ class="form-control"
type="number"
min="1"
max="9999"
autoClose="outside"
class="tc_menuitem">
<button ngbDropdownToggle
- class="btn btn-light tc_columnBtn">
+ class="btn btn-light tc_columnBtn"
+ title="toggle columns">
<i [ngClass]="[icons.large, icons.table]"></i>
</button>
<div ngbDropdownMenu>
<button type="button"
[class]="'btn btn-' + status.type"
[ngbTooltip]="status.msg"
- (click)="refreshBtn()">
+ (click)="refreshBtn()"
+ title="Refresh">
<i [ngClass]="[icons.large, icons.refresh]"
[class.fa-spin]="updating || loadingIndicator"></i>
</button>
[rowIdentity]="rowIdentity()"
[rowHeight]="'auto'">
+ <!-- Row Selection Template-->
+ <ng-template #rowSelectionTpl
+ let-value="value"
+ let-isSelected="isSelected"
+ ngx-datatable-cell-template>
+ <input type="checkbox"
+ [attr.aria-label]="isSelected ? 'selected' : 'select'"
+ [checked]="isSelected"
+ class="cd-datatable-checkbox" />
+ </ng-template>
+
<!-- Row Detail Template -->
<ngx-datatable-row-detail rowHeight="auto"
#detailRow>
timeAgoTpl: TemplateRef<any>;
@ViewChild('rowDetailsTpl', { static: true })
rowDetailsTpl: TemplateRef<any>;
+ @ViewChild('rowSelectionTpl', { static: true })
+ rowSelectionTpl: TemplateRef<any>;
// This is the array with the items to be shown.
@Input()
resizeable: false,
sortable: false,
draggable: false,
- checkboxable: true,
+ checkboxable: false,
canAutoResize: false,
cellClass: 'cd-datatable-checkbox',
+ cellTemplate: this.rowSelectionTpl,
width: 30
});
}