From e3a9f30b3035a503e2e617b7e7518d6ae78687ad Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 30 Jul 2024 14:40:46 +0200 Subject: [PATCH 1/2] 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 ca28b62b..d3db136b 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" [ariaLabel]="'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" [ariaLabel]="'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() From 579fc9f5a10ff6a19f98509ed24ff8f008772a2c Mon Sep 17 00:00:00 2001 From: markuczy Date: Tue, 30 Jul 2024 16:25:07 +0200 Subject: [PATCH 2/2] refactor: lint v4 --- .../lib/components/search-header/search-header.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 34f9799d..5dba8099 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,8 +49,8 @@ export class SearchHeaderComponent implements AfterViewInit { this._actions = value this.updateHeaderActions() } - @Input() searchButtonDisabled: boolean = false - @Input() resetButtonDisabled: boolean = false + @Input() searchButtonDisabled = false + @Input() resetButtonDisabled = false @Output() searched: EventEmitter = new EventEmitter() @Output() resetted: EventEmitter = new EventEmitter()