Closed westerncj closed 7 years ago
If you assign the same id to the cancel buttons for the row, you can do something like this:
$timeout(function() {
angular.element(document.querySelectorAll("#cancel")).trigger('click');
}, 50);
That works awesome! Why the timeout?
It's just something I copied from something similar I was doing. Try it with out the timeout and see if it works. Please close this issue if your issue is resolved.
Ok cool. Yeah if you remove the timeout you get a digest error. Thanks for your help!
If you have multiple rows in edit mode, is there anyway to cancel edit mode on all of them at once? If not, is there anything in $scope that would allow access to each form name for each row?