I am using Ag-grid in Angular 8 project. I have got stuck at one function call where i am using ag-grid's double click event. When cellDoubleClicked event gets fire, i am calling one method. But its calling that method twice if I quickly double click the grid's cell. But it works fine in slow down my mouse double clicking speed. What i did so far is in TS file declared the method and put console log. also i have put event in html and assigned callback function.
In my.Component.html file
<ag-grid-angular>
[columnDef] = "columnDef"
[rowData] = "rowData"
(gridReady) = "onGridReady($event)"
(cellClicked) = "onCellClicked($event)"
(cellDoubleClicked) = "onCellDoubleClicked($event)"
</ag-grid-angular>
In my.Component.ts file
IMPORTS GOES HERE...
export class MyComponent implements OnInit {
OTHER LOGIC GOES HERE...
onCellDoubleClicked($event){
console.log("method called"); //This will be called 2 times if you fast/quickly double click the cell. It should call once only
}
}