josebalius / ngReactGrid

A really fast Angular grid using the power of React to render. Based on ng-grid and jQuery DataTables.
http://josebalius.github.io/ngReactGrid/
MIT License
328 stars 47 forks source link

Switch to $watchCollection so that array operations on grid.data can be used #59

Closed JoeDoyle23 closed 9 years ago

JoeDoyle23 commented 9 years ago

First I want to thank you for the great library!

Getting started I ran into a strange situation where pushing new data into the grid.data array didn't cause the grid to be updated. Looking at the code, I found that $watch was being used instead of $watchCollection which triggers an update when changes within the array happen.

This change makes the grid act more inline like a traditional grid when changing the data source.

josebalius commented 9 years ago

Hey @JoeDoyle23, np thank you for your contribution :)

Merged.