Currently, I am encountering a problem where ng-grid data is not being displayed when column resizing occurs after changing the column names.
To demonstrate this issue, I have created a plunkr at - http://plnkr.co/edit/eV9baoDOV9A46FZmKW8G?p=preview
I would like to draw your attention to the function in main.js that explicitly changes the column names and their corresponding data.
$scope.reload = function(){
$scope.columnDefinitions = [
{field: 'first_col'},
{field: 'second_col'}
];
$scope.myData = [{first_col: "colData1", second_col: "colData2"},
{first_col: "colData3", second_col: "colData4"},
{first_col: "colData5", second_col: "colData6"}
];
}
Here are the steps followed -
Scenario 1 (Functional).
- After the complete loading of the example along with ng-grid data, click on the "change" button.
- Upon clicking, the "name" and "age" columns will be replaced by "first_col" and "second_col" along with their respective data.
Scenario 2 (Issue)
- Rerun the example.
- Once all data from ng-grid has loaded, resize the columns slightly.
- After resizing, click the "change" button again.
- As a result, the grid appears empty.
I am currently stuck with this problem. Any assistance or guidance provided will be greatly appreciated.