- Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
I am specifying a custom headerCellTemplate which contains a directive. In such a situation the directive template won't render until after the parent ui-grid directive has run through its link, which contains the following
var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') );
and then assigns various events to this element.
Unfortunately my header cell will not get these events bound as the relevant DOM doesn't exist yet. This can be fixed fairly easily with delegated events e.g.
$contentsElm.off('click', $scope.clickFn); becomes
$elm.off('click', '.ui-grid-cell-contents', $scope.clickFn);
I'll submit a PR for this shortly.
Metadata
Metadata
Assignees
Labels
No labels