angular-ui/ui-grid

[BUG] When enableFullRowSelection: true, rowSelectionChanged on tablet called twice and the select row is not the correct one

Open

#5,709 建立於 2016年9月30日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (2,496 fork)batch import
good first issue

倉庫指標

Star
 (5,395 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi,

I am using your library in my web application. I set enableFullRowSelection: true. When I testing on tablets (IPAD, Nexus 7) the rowSelectionChanged will called twice. and sometimes when I select one row, but the selection will move to above one or bottom one, no the one I selected.

The following is my code: $scope.gridOptions = { enableSorting: true, enableRowSelection: true, enableRowHeaderSelection: false, enableFullRowSelection: true, noUnselect: true, multiSelect: false, onRegisterApi: function (gridApi) { gridApi.selection.on.rowSelectionChanged($scope, function (selectedRow) { alert("onRowSelectionChanged: " + selectedRow); console.log("AnnotationsController.js, rowSelectionChanged"); $scope.selectedAnnotation = selectedRow.entity; }); $scope.gridapi = gridApi; },

I also set .ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell { pointer-events: none; } in my css.

Thanks in advance!

貢獻者指南