RED-6154, add unique ids to page header and table header inputs.
This commit is contained in:
parent
a2bde131ad
commit
d956c5f68d
@ -72,6 +72,7 @@
|
||||
<ng-content select="[slot=right]"></ng-content>
|
||||
|
||||
<iqser-circle-button
|
||||
[buttonId]="closeButtonId"
|
||||
(action)="closeAction.emit()"
|
||||
*ngIf="showCloseButton"
|
||||
[class.ml-6]="actionConfigs"
|
||||
|
||||
@ -35,6 +35,10 @@ export class PageHeaderComponent<T extends IListable> {
|
||||
|
||||
constructor(@Optional() readonly filterService: FilterService, @Optional() readonly searchService: SearchService<T>) {}
|
||||
|
||||
get closeButtonId() {
|
||||
return this.pageLabel?.toLowerCase()?.replace(/ /g, '-') + '-close-view-btn';
|
||||
}
|
||||
|
||||
get filterHelpModeKey() {
|
||||
return this.helpModeKey ? `filter_${this.helpModeKey}_list` : '';
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<div [class.selection-enabled]="selectionEnabled" class="header-item">
|
||||
<div [iqserHelpMode]="helpModeKey" class="header-title">
|
||||
<iqser-round-checkbox
|
||||
[id]="selectAllId"
|
||||
(click)="listingService.selectAll()"
|
||||
*ngIf="selectionEnabled"
|
||||
[active]="listingService.areAllSelected$ | async"
|
||||
@ -8,7 +9,7 @@
|
||||
></iqser-round-checkbox>
|
||||
|
||||
<span class="all-caps-label">
|
||||
{{ tableHeaderLabel | translate : { length: totalSize || (listingService.displayedLength$ | async) } }}
|
||||
{{ tableHeaderLabel | translate : {length: totalSize || (listingService.displayedLength$ | async)} }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@ -28,4 +28,8 @@ export class TableHeaderComponent<T extends IListable<PrimaryKey>, PrimaryKey ex
|
||||
readonly listingService: ListingService<T>,
|
||||
readonly filterService: FilterService,
|
||||
) {}
|
||||
|
||||
get selectAllId() {
|
||||
return this.tableHeaderLabel.split('.')[0].replace(/ /g, '-') + '-select-all-check';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user