My web application features an editable ng-grid that has greatly simplified my work, but I have encountered a minor issue. I need a way to detect when a user makes changes to the grid without having to compare each field before and after.
Currently, I am using the following code snippet:
$scope.$on('ngGridEventEndCellEdit', function(evt) {
//function goes here!
});
While this method somewhat works, it triggers the event even when the user simply clicks or tabs in and out of a cell without making any changes. I am looking for a more efficient solution.
Any suggestions would be greatly appreciated. Thank you!