angular-ui/ui-grid

gridApi.selection.clearSelectedRows(); doesn't deselect group heading selection

已關閉

#3,851 建立於 2015年6月24日

 (5 則留言) (0 個反應) (0 位負責人)JavaScript (2,496 個分叉)batch import
grid-selectionhelp wanted

倉庫指標

星標
 (5,395 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

gridApi.selection.on.rowSelectionChanged($scope, function (row) {
   console.log(row.entity);
   gridApi.selection.clearSelectedRows();
});

This doesn't seems to clear the selection of group heading, but triggers this event

enableRowSelection: true,
enableGroupHeaderSelection: true,
enableRowHeaderSelection: false,
groupingShowCounts: false,
multiSelect: false,

The above are the options i had enabled.

You are also able to select more than 1 group heading. I'm not sure if this is intended.

My use case is: I want the group headings to act like another row, so when i select a group heading, it will be like i selected a normal row and deselect the previously selected row.

http://plnkr.co/edit/SCPMbOIlF4tNbB7MX0Hx?p=preview

貢獻者指南