Skip to content

Commit

Permalink
feat: double-clicking grid rows should select the row rather than tog…
Browse files Browse the repository at this point in the history
…gle selection twice (#1740)

resolves: #1704

each click still toggles immediately, but the final state will always be
selected as double click handler comes after.
  • Loading branch information
dsmmcken authored Jan 25, 2024
1 parent 45fa929 commit f892e97
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint class-methods-use-this: "off" */
import {
type Grid,
GridMouseHandler,
GridPoint,
EventHandlerResult,
Expand All @@ -18,14 +19,16 @@ class IrisGridDataSelectMouseHandler extends GridMouseHandler {

irisGrid: IrisGrid;

onDoubleClick(gridPoint: GridPoint): EventHandlerResult {
onDoubleClick(gridPoint: GridPoint, grid: Grid): EventHandlerResult {
const { column, row } = gridPoint;
if (row == null || column == null) {
return false;
}

this.irisGrid.selectData(column, row);

grid.moveCursorToPosition(column, row);

return true;
}
}
Expand Down

0 comments on commit f892e97

Please sign in to comment.