请在plunker中找到ng网格示例
http://plnkr.co/edit/CncDWCktXTuBQdDVfuVv?p=preview
它将允许用户只选择一行,但始终会有一个选定的行.我想取消选择所有行.
ng-grid具有keepLastSelected选项.
尝试:
keepLastSelected:gridOptions中的false.这将切换选择.
例
$scope.gridOptions = { data: 'myData',selectedItems: $scope.mySelections,multiSelect: false,keepLastSelected: false };