Skip to content

Commit

Permalink
Merge pull request #15106 from primefaces/issue-14888
Browse files Browse the repository at this point in the history
Fixed #14888 - Remove extra conditional
  • Loading branch information
cetincakiroglu authored Mar 20, 2024
2 parents 38ecd5f + 01c0d62 commit dc9357e
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable

if (this._columns && this.isStateful() && this.reorderableColumns && !this.columnOrderStateRestored) {
this.restoreColumnOrder();

this.tableService.onColumnsChange(this._columns);
}
}
Expand Down Expand Up @@ -2854,9 +2855,9 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
this.tableWidthState = state.tableWidth;
}

if (this.reorderableColumns) {
this.restoreColumnOrder();
}
// if (this.reorderableColumns) {
// this.restoreColumnOrder();
// }

if (state.expandedRowKeys) {
this.expandedRowKeys = state.expandedRowKeys;
Expand Down Expand Up @@ -5754,7 +5755,16 @@ export class ColumnFilter implements AfterContentInit {
</ng-container>
<ng-template #builtInElement>
<ng-container [ngSwitch]="type">
<input *ngSwitchCase="'text'" type="text" [ariaLabel]="ariaLabel" pInputText [value]="filterConstraint?.value" (input)="onModelChange($event.target.value)" (keydown.enter)="onTextInputEnterKeyDown($event)" [attr.placeholder]="placeholder" />
<input
*ngSwitchCase="'text'"
type="text"
[ariaLabel]="ariaLabel"
pInputText
[value]="filterConstraint?.value"
(input)="onModelChange($event.target.value)"
(keydown.enter)="onTextInputEnterKeyDown($event)"
[attr.placeholder]="placeholder"
/>
<p-inputNumber
*ngSwitchCase="'numeric'"
[ngModel]="filterConstraint?.value"
Expand Down Expand Up @@ -5813,7 +5823,7 @@ export class ColumnFilterFormElement implements OnInit {

@Input() useGrouping: boolean = true;

@Input() ariaLabel: string | undefined;
@Input() ariaLabel: string | undefined;

get showButtons(): boolean {
return this.colFilter.showButtons;
Expand Down

0 comments on commit dc9357e

Please sign in to comment.