File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -885,7 +885,8 @@ angular.module('ui.grid')
885
885
*/
886
886
Grid . prototype . preCompileCellTemplates = function ( ) {
887
887
var self = this ;
888
- this . columns . forEach ( function ( col ) {
888
+
889
+ var preCompileTemplate = function ( col ) {
889
890
var html = col . cellTemplate . replace ( uiGridConstants . MODEL_COL_FIELD , self . getQualifiedColField ( col ) ) ;
890
891
html = html . replace ( uiGridConstants . COL_FIELD , 'grid.getCellValue(row, col)' ) ;
891
892
@@ -906,6 +907,16 @@ angular.module('ui.grid')
906
907
if ( col . compiledElementFnDefer ) {
907
908
col . compiledElementFnDefer . resolve ( col . compiledElementFn ) ;
908
909
}
910
+ } ;
911
+
912
+ this . columns . forEach ( function ( col ) {
913
+ if ( col . cellTemplate ) {
914
+ preCompileTemplate ( col ) ;
915
+ } else if ( col . cellTemplatePromise ) {
916
+ col . cellTemplatePromise . then ( function ( ) {
917
+ preCompileTemplate ( col ) ;
918
+ } ) ;
919
+ }
909
920
} ) ;
910
921
} ;
911
922
You can’t perform that action at this time.
0 commit comments