diff --git a/src/app/components/api/translationkeys.ts b/src/app/components/api/translationkeys.ts index d522fd9c6f3..6472681e872 100644 --- a/src/app/components/api/translationkeys.ts +++ b/src/app/components/api/translationkeys.ts @@ -41,4 +41,6 @@ export class TranslationKeys { public static readonly PASSWORD_PROMPT = 'passwordPrompt'; public static readonly EMPTY_MESSAGE = 'emptyMessage'; public static readonly EMPTY_FILTER_MESSAGE = 'emptyFilterMessage'; + public static readonly SHOW_FILTER_MENU = 'Show Filter Menu'; + public static readonly HIDE_FILTER_MENU = 'Hide Filter Menu'; } diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 73f61fd8d30..c237aeaa4d0 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -4064,7 +4064,7 @@ export class EditableColumn implements OnChanges, AfterViewInit, OnDestroy { constructor(public dt: Table, public el: ElementRef, public zone: NgZone) {} public ngOnChanges(changes: SimpleChanges): void { - if (this.el.nativeElement && (!changes.data?.firstChange)) { + if (this.el.nativeElement && !changes.data?.firstChange) { this.dt.updateEditingCell(this.el.nativeElement, this.data, this.field, this.rowIndex); } } @@ -4924,7 +4924,7 @@ export class ReorderableRow implements AfterViewInit { type="button" class="p-column-filter-menu-button p-link" aria-haspopup="true" - [attr.aria-label]="showMenuButtonAriaLabel" + [attr.aria-label]="showMenuButtonLabel" [attr.aria-controls]="overlayId" [attr.aria-expanded]="overlayVisible" [ngClass]="{ 'p-column-filter-menu-button-open': overlayVisible, 'p-column-filter-menu-button-active': hasFilter() }" @@ -5231,6 +5231,10 @@ export class ColumnFilter implements AfterContentInit { return this.showAddButton && this.type !== 'boolean' && this.fieldConstraints && this.fieldConstraints.length < this.maxConstraints; } + get showMenuButtonLabel() { + return this.config.getTranslation(TranslationKeys.SHOW_FILTER_MENU); + } + get applyButtonLabel(): string { return this.config.getTranslation(TranslationKeys.APPLY); }