Angular cell row selection

I am using angular ui.grid, my problem is that when I use, as shown below, click on the selected row

enableRowSelection: true,
enableRowHeaderSelection: false,
multiSelect: false 

after i changed to

enableRowSelection: true,
enableRowHeaderSelection: true,
multiSelect: false 

now just check the box, but the click bar does not work, please help ...

+4
source share
2 answers

See this problem: https://github.com/angular-ui/ng-grid/issues/2254

Currently, selecting a row header and row selection does not work consistently. I believe that the former was intended to work with row selection when using site navigation.

, , 3.0.

Update:

, ( - -, "" , IMO).

uiGridCell, . , : https://github.com/angular-ui/ng-grid/blob/v3.0.0-rc.20/src/features/selection/js/selection.js#L757

- . , , .

angular.module('ui.grid.custom.rowSelection', ['ui.grid'])

.directive('uiGridCell', function ($timeout, uiGridSelectionService) {
  if ($scope.col.isRowHeader) {
    return;
  }

  registerRowSelectionEvents();

  function selectCells(evt) { ... }
  function touchStart(evt) { ... }
  function touchEnd(evt) { ... }
  function registerRowSelectionEvents() { ... }
});

, . : http://plnkr.co/edit/44SYdj19pDDaJWiSaPBt?p=preview

+3

​​(https://github.com/angular-ui/ui-grid/commit/679b615bd19ff71ff1e835d7f6066e7a919f279a), - angular -ui-grid 3.1.1

(https://github.com/angular-ui/ui-grid/issues/5474) , css :

.ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell {
  pointer-events: auto;
}
+8

All Articles