Skip to content

Commit

Permalink
Merge pull request #241 from 6pac/fix/editor-with-active-row
Browse files Browse the repository at this point in the history
fix issue #68 editor with activeRow selection
  • Loading branch information
6pac committed May 12, 2018
2 parents 5d9e444 + b216a04 commit d778e25
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2749,7 +2749,9 @@ if (typeof Slick === "undefined") {
scrollRowIntoView(cell.row, false);

var preClickModeOn = (e.target && e.target.className === Slick.preClickClassName);
setActiveCellInternal(getCellNode(cell.row, cell.cell), null, preClickModeOn);
var column = columns[cell.cell];
var suppressActiveCellChangedEvent = (options.editable && column && column.editor) ? true : false;
setActiveCellInternal(getCellNode(cell.row, cell.cell), null, preClickModeOn, suppressActiveCellChangedEvent);
}
}
}
Expand Down Expand Up @@ -3704,7 +3706,7 @@ if (typeof Slick === "undefined") {
var newCell = getCellNode(row, cell);

// if selecting the 'add new' row, start editing right away
setActiveCellInternal(newCell, forceEdit || (row === getDataLength()) || options.autoEdit);
setActiveCellInternal(newCell, (forceEdit || (row === getDataLength()) || options.autoEdit), null, options.editable);

// if no editor was created, set the focus back on the grid
if (!currentEditor) {
Expand Down

0 comments on commit d778e25

Please sign in to comment.