From 2058dc293d23e2e76c6dc2512b9988e96f9a9ed7 Mon Sep 17 00:00:00 2001 From: phong cao Date: Sun, 17 Sep 2023 00:03:13 +0700 Subject: [PATCH] feat(): edit column --- .../custom-action-cell/custom-action-cell.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/mix-cms/src/app/pages/portal/database-data/components/custom-action-cell/custom-action-cell.component.ts b/apps/mix-cms/src/app/pages/portal/database-data/components/custom-action-cell/custom-action-cell.component.ts index bed9bc4b..97da3eb7 100644 --- a/apps/mix-cms/src/app/pages/portal/database-data/components/custom-action-cell/custom-action-cell.component.ts +++ b/apps/mix-cms/src/app/pages/portal/database-data/components/custom-action-cell/custom-action-cell.component.ts @@ -14,6 +14,7 @@ import { ICellRendererParams } from 'ag-grid-community'; }) export class CustomActionCellComponent implements ICellRendererAngularComp { public cellValue!: string; + public dataId!: number; public agInit(params: ICellRendererParams): void { this.cellValue = this.getValueToDisplay(params); @@ -29,7 +30,7 @@ export class CustomActionCellComponent implements ICellRendererAngularComp { } public getValueToDisplay(params: ICellRendererParams) { - console.log(params); + this.dataId = params.data.id; return params.valueFormatted ? params.valueFormatted : params.value; } }