javascript - angular ui grid single click with editableCellTemplate -
i'm having trouble getting angular ui grid enter editing mode in cell on single click when im using celltemplate/editablecelltemplate. here plunker demonstrates code have , problem i'm having. if click on cell under hte name column, notice single click, cell under type column double click, needs single click.
steps reproduce:
- click on cell under id column
- click cell under name column (notice edit on single click!)
- click cell under id column again or in white space of grid/or off grid
- click on cell under type column (should single click edit mode, requires double click)
`var app = angular.module('app', ['ngtouch', 'ui.grid', 'ui.grid.edit',` 'ui.grid.resizecolumns', 'ui.grid.movecolumns', 'ui.grid.autoresize', "ui.grid.pagination", "ui.grid.edit", "ui.grid.cellnav", "ui.grid.selection", "ui.grid.pinning"]); //draggablerows? app.controller('mainctrl', ['$scope', function ($scope) { $scope.gridoptions = { excludeproperties: '__metadata', enablepaginationcontrols: false, useexternalsorting: true, useexternalfiltering: true, enablefiltering: true, onregisterapi: function (gridapi) { $scope.gridapi = gridapi; $scope.gridapi.edit.on.aftercelledit($scope, function(rowentity, coldef, newvalue, oldvalue) { }); } }; $scope.gridoptions.columndefs = [ { name: 'id', enablecelledit: false, width: '10%', pinnedleft : true, }, { name: 'name', enablecelledit: false, displayname: 'name', width: '20%', pinnedleft : true, }, { name: 'type', displayname: 'type', enablecelledit: true, enablecelleditonfocus: true, celleditablecondition: true, celltemplate: 'passfailtemplate.html', editablecelltemplate: 'editablepassfailtemplate.html', width: '70%' } ]; $scope.load = function () { $scope.gridoptions.data = [{ "id ": "1", "name": "2.03", "type": "needs single click edit here", }] }; $scope.load(); }]); ...see plunker
Comments
Post a Comment