From 0a5044aeff2580527763604fddbfa170e277462f Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 30 Jul 2024 14:40:46 +0200 Subject: [PATCH] feat: search and reset buttons can be disabled --- .../components/search-header/search-header.component.html | 7 ++++++- .../components/search-header/search-header.component.ts | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/angular-accelerator/src/lib/components/search-header/search-header.component.html b/libs/angular-accelerator/src/lib/components/search-header/search-header.component.html index d19ae569..43ebf8a2 100644 --- a/libs/angular-accelerator/src/lib/components/search-header/search-header.component.html +++ b/libs/angular-accelerator/src/lib/components/search-header/search-header.component.html @@ -7,7 +7,10 @@ - + @@ -24,6 +27,7 @@ icon="pi pi-eraser" [attr.aria-label]="'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate" title="{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}" + [disabled]="resetButtonDisabled" > @@ -34,6 +38,7 @@ icon="pi pi-search" [attr.aria-label]="'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate" title="{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}" + [disabled]="searchButtonDisabled" > diff --git a/libs/angular-accelerator/src/lib/components/search-header/search-header.component.ts b/libs/angular-accelerator/src/lib/components/search-header/search-header.component.ts index 521fdc37..34f9799d 100644 --- a/libs/angular-accelerator/src/lib/components/search-header/search-header.component.ts +++ b/libs/angular-accelerator/src/lib/components/search-header/search-header.component.ts @@ -49,6 +49,8 @@ export class SearchHeaderComponent implements AfterViewInit { this._actions = value this.updateHeaderActions() } + @Input() searchButtonDisabled: boolean = false + @Input() resetButtonDisabled: boolean = false @Output() searched: EventEmitter = new EventEmitter() @Output() resetted: EventEmitter = new EventEmitter()