-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(uiGridCell): Use promises for tmpl processing
Issue #1712 demonstrates a race condition where a column's compiledElementFn is attempted to be called before the cellTemplate is present, e.g. in the case of a template fetched over the network. This causes the function to not be present and an exception to be thrown. This changes fixes this by added a getCompiledElementFn() method to GridColumn, which returns a promise that is created in the defaultColumnBuilder(). It gets resolved in Grid.preCompileCellTemplates(). uiGridCell now uses this promise if the function is not present at pre-link time. Added tests for getCompiledElementFn() and getCellTemplate() Fixes #1712
- Loading branch information
Showing
7 changed files
with
160 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="ui-grid-cell-contents"> | ||
Testing $http template: {{COL_FIELD CUSTOM_FILTERS}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters