From 983232d3f99d121e09e2a76e12569cbd50f3ddf7 Mon Sep 17 00:00:00 2001 From: manasa Date: Fri, 22 May 2026 15:45:41 +0530 Subject: [PATCH] Fixed the action views not rendering in EmbeddedData modal --- .../simple-table-manual.component.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts b/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts index 2aaa4d74..4ee179d8 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/simple-table-manual.component.ts @@ -159,12 +159,15 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy { referenceListStr: any; bUseSeparateViewForEdit: any; editView: any; + defaultActionId: any; + editActionId: any; settingsSvgIcon$: string; isInitialized = false; targetClassLabel: string; localizedVal = PCore.getLocaleUtils().getLocaleValue; localeCategory = 'SimpleTable'; + editType: any; constructor( private angularPConnect: AngularPConnectService, public utils: Utils, @@ -308,6 +311,10 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy { this.defaultView = editModeConfig ? editModeConfig.defaultView : viewForAddAndEditModal; this.bUseSeparateViewForEdit = editModeConfig ? editModeConfig.useSeparateViewForEdit : useSeparateViewForEdit; this.editView = editModeConfig ? editModeConfig.editView : viewForEditModal; + this.editType = editModeConfig?.editType; + this.defaultActionId = this.editType === 'action' ? editModeConfig?.defaultAction : undefined; + this.editActionId = + this.editType === 'action' && editModeConfig?.useSeparateActionForEdit ? editModeConfig?.editAction : editModeConfig?.defaultAction; const primaryFieldsViewIndex = resolvedFields.findIndex(field => field.config.value === 'pyPrimaryFields'); // const showDeleteButton = !this.readOnlyMode && !hideDeleteRow; @@ -958,17 +965,18 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy { } addRecord() { - if (this.allowEditingInModal && this.defaultView) { + if (this.allowEditingInModal && (this.defaultView || this.defaultActionId)) { this.pConn$ .getActionsApi() - // @ts-expect-error .openEmbeddedDataModal( this.defaultView, this.pConn$ as any, this.referenceListStr, this.referenceList.length, PCore.getConstants().RESOURCE_STATUS.CREATE, - this.targetClassLabel + this.targetClassLabel, + this.editType, + this.defaultActionId ); } else { this.pConn$.getListActions().insert({ classID: this.contextClass }, this.referenceList.length);