File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 88
88
* </pre>
89
89
* @param {object } rowEntity the options.data element that was edited
90
90
* @param {object } colDef the column that was edited
91
+ * @param {object } triggerEvent the event that triggered the edit. Useful to prevent losing keystrokes on some
92
+ * complex editors
91
93
*/
92
- beginCellEdit : function ( rowEntity , colDef ) {
94
+ beginCellEdit : function ( rowEntity , colDef , triggerEvent ) {
93
95
} ,
94
96
/**
95
97
* @ngdoc event
568
570
569
571
function beginEditKeyDown ( evt ) {
570
572
if ( uiGridEditService . isStartEditKey ( evt ) ) {
571
- beginEdit ( ) ;
573
+ beginEdit ( evt ) ;
572
574
}
573
575
}
574
576
664
666
* </pre>
665
667
*
666
668
*/
667
- function beginEdit ( ) {
669
+ function beginEdit ( triggerEvent ) {
668
670
// If we are already editing, then just skip this so we don't try editing twice...
669
671
if ( inEdit ) {
670
672
return ;
760
762
deregOnEndCellEdit ( ) ;
761
763
} ) ;
762
764
763
- $scope . $broadcast ( uiGridEditConstants . events . BEGIN_CELL_EDIT ) ;
764
- $scope . grid . api . edit . raise . beginCellEdit ( $scope . row . entity , $scope . col . colDef ) ;
765
+ $scope . $broadcast ( uiGridEditConstants . events . BEGIN_CELL_EDIT , triggerEvent ) ;
766
+ $scope . grid . api . edit . raise . beginCellEdit ( $scope . row . entity , $scope . col . colDef , triggerEvent ) ;
765
767
}
766
768
767
769
function endEdit ( retainFocus ) {
You can’t perform that action at this time.
0 commit comments