Scroll to focus is not working on a newly added row when the new item is added to the bottom of the table.
https://github.com/angular-ui/ui-grid/issues/5325 discusses this issue.
The plnkr link http://plnkr.co/edit/OSbiB5C0RDPsqXJV0yjy?p=preview given there as solution is working as expected when the new item is added at the top.
i.e. $scope.gridOptions.data.unshift(newobj);
But if I do this $scope.gridOptions.data.push(newobj);
It is not working.
I'm using this logic to shift the focus to the newly added row
var rowIndex = $scope.gridOptions.data.length-1;
var colIndex = 1;
$scope.gridApi.cellNav.scrollToFocus($scope.gridOptions.data[rowIndex], $scope.gridOptions.columnDefs[colIndex]);
The newly added row is not visible. But if I scroll down to the bottom I'm able to see the new row.