ErickRuano / angular-pivot

Angular wrapper for Nicolas Kruchten's Pivot Table
MIT License
15 stars 13 forks source link

Added deep comparison on watchers and parameters to re-render the table #7

Closed bernardocout closed 6 years ago

bernardocout commented 6 years ago

If you set the values array when the angular controller inits, everything works smoothly, but if you change the array by requesting the values from an API, the table doesn't render again. If you request the values from an API, the pivot table doesn't render again. To fix this issue I added deep comparison in both $watch and also I added an extra parameter to the pivotUI method to render the table again.