You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, there seems to be a race condition going on when using custom header templates (fetched by url and NOT defined as inline html templates) in combination with the autoresize directive. This only happens in Firefox, the problem does not occur in IE-9/11 or Chrome. The result is an empty header cell.
The problem occurs because the autoresize directive triggers a refresh of the grid, by calling startTimeout(), when the custom templates not have been loaded yet (i.e. the template promises have not been resolved). The refresh in turn executes the uiGridHeaderCell directive, resulting in an empty $scope.col.headerCellTemplate.
I do have a workaround for the problem, but this is probably not the best solution:
module.directive('uiGridAutoResize', ['$timeout', 'gridUtil', function ($timeout, gridUtil) {
return {
require: 'uiGrid',
scope: false,
link: function ($scope, $elm, $attrs, uiGridCtrl) {
var prevGridWidth, prevGridHeight;
var isInitialized = false;
...
// instead of calling startTimeout directly, wait until the grid rows are rendered for the first time
uiGridCtrl.grid.api.core.on.rowsRendered($scope, function () {
if (!isInitialized) {
isInitialized = true;
startTimeout();
}
});
$scope.$on('$destroy', function() {
clearTimeout(resizeTimeoutId);
});
...
The text was updated successfully, but these errors were encountered:
…r-cell`, `filter`.
Fixes issues #4744, #5717, #5115, #5196, #5712, #5260, #5196, #4851, #4514, #5601
For URL-based templates we need to be sure that content arrived before `$compile` and `$elm.append` call.
Hi, there seems to be a race condition going on when using custom header templates (fetched by url and NOT defined as inline html templates) in combination with the autoresize directive. This only happens in Firefox, the problem does not occur in IE-9/11 or Chrome. The result is an empty header cell.
The problem occurs because the autoresize directive triggers a refresh of the grid, by calling startTimeout(), when the custom templates not have been loaded yet (i.e. the template promises have not been resolved). The refresh in turn executes the uiGridHeaderCell directive, resulting in an empty $scope.col.headerCellTemplate.
I do have a workaround for the problem, but this is probably not the best solution:
The text was updated successfully, but these errors were encountered: