angular-ui/ui-grid

Multiple functions get called when used in columnDefs's field

Open

#6,326 opened on Jul 20, 2017

View on GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (5,395 stars) (2,496 forks)batch import
help wantedseverity: performance

Description

My issue is like what @chanont-poon mentioned about in this issue https://github.com/angular-ui/ui-grid/issues/3753

I want to assign a function to columnDef's field but the function is getting called multiple times even when you double click the cells and get out of the cells. Check the example of the plunker: http://plnkr.co/edit/s2f94eTtkyKvPFW5QfG2?p=preview (Check the console and see how it behaves)

And I found this tutorial (http://ui-grid.info/docs/#/tutorial/316_dynamic_data_changes). Is it because of like what this tutorial mentioned about?

On every digest cycle every binding is evaluated to see if anything has changed, and updates made as appropriate. ui-grid explicitly seeks to avoid this.

I wish someone can help me with this because this is a serious issue. Because the page will keep calling it all the time and this could slow down the page to be loaded.

Is it a default behavior and why is it behaving this way?

Contributor guide