From 0fc5bb66c8d1e75f48cc79853bd5c36f1529c370 Mon Sep 17 00:00:00 2001 From: rusikv Date: Fri, 17 May 2024 19:04:39 +0300 Subject: [PATCH 1/2] UI: fixed widget action dialog column index field blocks save --- .../widget/action/widget-action-dialog.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts b/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts index 230811fbd1..7a8d14e561 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts @@ -118,7 +118,7 @@ export class WidgetActionDialogComponent extends DialogComponent { if (this.action?.actionSourceId === 'cellClick' && isDefinedAndNotNull(this.action.columnIndex) && this.widgetActionFormGroup.get('columnIndex').value === null) { + this.widgetActionFormGroup.get('columnIndex').setValidators([Validators.required]); + this.widgetActionFormGroup.get('columnIndex').updateValueAndValidity(); this.columnIndexPlaceholderText = `${this.action.columnIndex} (${this.translate.instant('widget-config.not-set')})`; this.columnIndexSelect.focus(); } From 1d92cd227e89567540bc2ebe8f5f6ffbd1dc4291 Mon Sep 17 00:00:00 2001 From: rusikv Date: Mon, 20 May 2024 15:29:32 +0300 Subject: [PATCH 2/2] UI: refactored widget-action-dialog column index validation --- .../action/widget-action-dialog.component.ts | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts b/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts index 7a8d14e561..8f2398cab2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/action/widget-action-dialog.component.ts @@ -118,7 +118,7 @@ export class WidgetActionDialogComponent extends DialogComponent { - if (this.action?.actionSourceId === 'cellClick' && isDefinedAndNotNull(this.action.columnIndex) && - this.widgetActionFormGroup.get('columnIndex').value === null) { - this.widgetActionFormGroup.get('columnIndex').setValidators([Validators.required]); - this.widgetActionFormGroup.get('columnIndex').updateValueAndValidity(); - this.columnIndexPlaceholderText = `${this.action.columnIndex} (${this.translate.instant('widget-config.not-set')})`; - this.columnIndexSelect.focus(); + if (this.action?.actionSourceId === 'cellClick') { + this.widgetActionFormGroup.get('columnIndex').enable(); + if (isDefinedAndNotNull(this.action.columnIndex) && this.widgetActionFormGroup.get('columnIndex').value === null) { + this.columnIndexPlaceholderText = `${this.action.columnIndex} (${this.translate.instant('widget-config.not-set')})`; + this.columnIndexSelect.focus(); + } } }); } @@ -255,9 +254,6 @@ export class WidgetActionDialogComponent extends DialogComponent