From 6edb26202842ea1a4d37101a14ba50a708e7d706 Mon Sep 17 00:00:00 2001 From: Pushpendra Kumar Date: Fri, 5 Jan 2024 09:16:28 +0530 Subject: [PATCH] fix: select actions button was mapping to enitity[0].actions --- .../add-event-dialog/add-event-dialog.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts b/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts index 2544c9b30..732daa499 100644 --- a/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts +++ b/src/app/system/manage-hooks/add-event-dialog/add-event-dialog.component.ts @@ -26,8 +26,8 @@ export class AddEventDialogComponent implements OnInit { * @param {any} data Provides grouping, entities and actions data to fill dropdowns. */ constructor(public dialogRef: MatDialogRef, - public formBuilder: UntypedFormBuilder, - @Inject(MAT_DIALOG_DATA) public data: any) { + public formBuilder: UntypedFormBuilder, + @Inject(MAT_DIALOG_DATA) public data: any) { } /** @@ -59,7 +59,7 @@ export class AddEventDialogComponent implements OnInit { setEntityListener() { this.eventForm.get('entity').valueChanges .subscribe(changedEntity => { - this.actionData = this.entityData[0].actions; + this.actionData = this.entityData.find((entity: any) => entity.name === changedEntity).actions; }); }