Skip to content

Commit

Permalink
Fixed #14537
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Jan 17, 2024
1 parent 830a3ee commit 12ca541
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/app/components/api/translationkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

This comment has been minimized.

Copy link
@TaneliTuomola

TaneliTuomola Jan 19, 2024

Should be 'showFilterMenu' and 'hideFilterMenu'? @cetincakiroglu

public static readonly HIDE_FILTER_MENU = 'Hide Filter Menu';
}
8 changes: 6 additions & 2 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, <number>this.rowIndex);
}
}
Expand Down Expand Up @@ -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() }"
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 12ca541

Please sign in to comment.