I am using an Angular UI grid
on my page. Whenever a user double clicks on a row, a modal pops up displaying the row data for updating.
After a successful update, I need to display the latest data in the UI grid. To achieve this, I have two options:
Upon successful backend call, I can reload the current state by using $state.go($state.current, {}, {reload: true}). This will fetch the grid data and load the page again.
Alternatively, I can retrieve the full list of updated data as a result of the successful AJAX update and then feed that data into the grid using $scope.gridOptions.data = latestData;
I would appreciate any suggestions on the best approach to take.