Tuesday, February 15, 2022

ag-grid onCellClicked单击单元格事件



Reference:

https://www.itxst.com/ag-grid/ueui3ury.html

Example: in AG Grid:

             columnDefs: [
                { field: 'application_id', headerName: 'ID', editable: false, cellStyle: nonEditable, pinned: 'left', hide: true },
                { field: 'type', headerName: 'Fund Type', editable: false, cellStyle: nonEditable, },
        ],
 onCellClicked(params) {
 let action = params.event.target.dataset.action;

                    if (action === "delete") {
                        // params.api.applyTransaction({
                        //   remove: [params.node.data]
                        // });
                        params.context.componentParent.handleDel(params.data.application_id)
                    }

No comments:

Post a Comment