I have implemented an ag-grid
in 4 different Angular
Components. My goal is to only enable the rowDoubleClicked
functionality for one specific component. Unfortunately, when I apply this feature to the grid, it becomes enabled for all components.
How can I ensure that the rowDoubleClicked
event is emitted only for that particular component?
I have come across suggestions to use
this.gridOptions.onRowDoubleClicked
in the component.ts file, but I am unsure of the exact implementation to target a specific method.
template :-
<ag-grid-angular
[columnDefs]="columnDefs"
[rowData]="rowData"
[rowSelection]="rowSelection"
(gridReady)="onGridReady($event)"
(rowDoubleClicked) = "onRowDoubleClick()"
gridOptions="{{ gridOptions }}"
>
</ag-grid-angular>
component.ts :-
onRowDoubleClick(){
console.log("Double Click works for a particular component");
}