Hi team,
I am using cellTemplate with cellNav for navigation cell and try to edit the cell when clicking on the cell. However ,if there is no any div in template, the click event would not fire. I find in the source code below . The click event was bind to a div not the element itself. if there is no div element, how to fire "click" event. Or $elm.on('click'....) should be a right one. thanks.
src/features/cellnav/js/cellnav.js line 1070
// When a cell is clicked, broadcast a cellNav event saying that this row+col combo is now focused
$elm.find('div').on('click', function (evt) {
uiGridCtrl.cellNav.broadcastCellNav(new GridRowColumn($scope.row, $scope.col), evt.ctrlKey || evt.metaKey, evt);
evt.stopPropagation();
$scope.$apply();
});
/*
* XXX Hack for screen readers.
* This allows the grid to focus using only the screen reader cursor.
* Since the focus event doesn't include key press information we can't use it
* as our primary source of the event.
*/
$elm.on('mousedown', preventMouseDown);
Hi team,
I am using cellTemplate with cellNav for navigation cell and try to edit the cell when clicking on the cell. However ,if there is no any div in template, the click event would not fire. I find in the source code below . The click event was bind to a div not the element itself. if there is no div element, how to fire "click" event. Or $elm.on('click'....) should be a right one. thanks.
src/features/cellnav/js/cellnav.js line 1070