Skip to content

Commit f892e97

Browse files
authored
feat: double-clicking grid rows should select the row rather than toggle selection twice (#1740)
resolves: #1704 each click still toggles immediately, but the final state will always be selected as double click handler comes after.
1 parent 45fa929 commit f892e97

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/iris-grid/src/mousehandlers/IrisGridDataSelectMouseHandler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint class-methods-use-this: "off" */
22
import {
3+
type Grid,
34
GridMouseHandler,
45
GridPoint,
56
EventHandlerResult,
@@ -18,14 +19,16 @@ class IrisGridDataSelectMouseHandler extends GridMouseHandler {
1819

1920
irisGrid: IrisGrid;
2021

21-
onDoubleClick(gridPoint: GridPoint): EventHandlerResult {
22+
onDoubleClick(gridPoint: GridPoint, grid: Grid): EventHandlerResult {
2223
const { column, row } = gridPoint;
2324
if (row == null || column == null) {
2425
return false;
2526
}
2627

2728
this.irisGrid.selectData(column, row);
2829

30+
grid.moveCursorToPosition(column, row);
31+
2932
return true;
3033
}
3134
}

0 commit comments

Comments
 (0)