Skip to content

Commit

Permalink
feat: search and reset buttons can be disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy committed Jul 30, 2024
1 parent 5ec11fd commit e3a9f30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<ng-template #additionalToolbarContentLeft>
<ocx-search-config [searchConfigs]="searchConfigs" (selectedSearchConfigChanged)="confirmSearchConfig($event)">
</ocx-search-config>
<ng-container *ngIf="_additionalToolbarContentLeft" [ngTemplateOutlet]="_additionalToolbarContentLeft"></ng-container>
<ng-container
*ngIf="_additionalToolbarContentLeft"
[ngTemplateOutlet]="_additionalToolbarContentLeft"
></ng-container>
</ng-template>
<ng-template #additionalToolbarContent>
<ng-container *ngIf="_additionalToolbarContent" [ngTemplateOutlet]="_additionalToolbarContent"></ng-container>
Expand All @@ -24,6 +27,7 @@
icon="pi pi-eraser"
[ariaLabel]="'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate"
title="{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}"
[disabled]="resetButtonDisabled"
>
</p-button>

Expand All @@ -34,6 +38,7 @@
icon="pi pi-search"
[ariaLabel]="'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate"
title="{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}"
[disabled]="searchButtonDisabled"
>
</p-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export class SearchHeaderComponent implements AfterViewInit {
this._actions = value
this.updateHeaderActions()
}
@Input() searchButtonDisabled: boolean = false

Check failure on line 52 in libs/angular-accelerator/src/lib/components/search-header/search-header.component.ts

View workflow job for this annotation

GitHub Actions / main

Type boolean trivially inferred from a boolean literal, remove type annotation
@Input() resetButtonDisabled: boolean = false

Check failure on line 53 in libs/angular-accelerator/src/lib/components/search-header/search-header.component.ts

View workflow job for this annotation

GitHub Actions / main

Type boolean trivially inferred from a boolean literal, remove type annotation

@Output() searched: EventEmitter<any> = new EventEmitter()
@Output() resetted: EventEmitter<any> = new EventEmitter()
Expand Down

0 comments on commit e3a9f30

Please sign in to comment.