angulargrid icon indicating copy to clipboard operation
angulargrid copied to clipboard

Validate existence of model for infinite-scroll trigger

Open warent opened this issue 8 years ago • 0 comments

Hey there,

Great directive; I'm a big fan! This is being implemented in a web app that I'm developing, and it's important to me that I maximize performance of the app.

I found that the angular-grid model is being used on a $watch primarily for the purpose of infinite scrolls and refreshes. In my app I'm able to substantially boost performance by manually triggering the angularGridInstance.id.refresh() function and removing the model altogether. In order to do this, I just made these minor modifications. Also, I added the ability to make the model an integer as well, perhaps could be helpful for calculating the number of children in the model.

Hope this helps!

warent avatar Jun 03 '16 18:06 warent