Skip to content

Commit 3d5d603

Browse files
committed
fix(selection): allow rowSelection to be navigable if using cellNav; allow rowSelection via the space bar
1 parent b7d6928 commit 3d5d603

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/features/selection/js/selection.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,8 @@
636636
headerCellTemplate: 'ui-grid/selectionHeaderCell',
637637
enableColumnResizing: false,
638638
enableColumnMenu: false,
639-
exporterSuppressExport: true
639+
exporterSuppressExport: true,
640+
allowCellFocus: true
640641
};
641642

642643
uiGridCtrl.grid.addRowHeaderColumn(selectionRowHeaderDef);
@@ -765,6 +766,14 @@
765766

766767
var touchStartTime = 0;
767768
var touchTimeout = 300;
769+
770+
$elm.bind('keydown', function (evt) {
771+
if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
772+
uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
773+
$scope.$apply();
774+
}
775+
});
776+
768777
var selectCells = function(evt){
769778
if (evt.shiftKey) {
770779
uiGridSelectionService.shiftSelect($scope.grid, $scope.row, evt, $scope.grid.options.multiSelect);

0 commit comments

Comments
 (0)