我在ui-grid列中添加了自定义可编辑单元格模板 这是代码:
{
name:'progetto',
width: '42%',
enableCellEditOnFocus: true,
cellEditableCondition: true,
cellTemplate:'<div style="text-align:left;height: 40px;line-height: 40px;font-size:1.1em;padding-left:10px;">{{COL_FIELD}}</div>',
editableCellTemplate: '<ui-select-wrap><div class="typeaheadcontainer"><input type="INPUT_TYPE" ng-model="MODEL_COL_FIELD" class="typeaheadcontrol" style="color:#333;text-align:left;height:40px;line-height:40px;font-size:1.1em;padding-left:10px;" ui-grid-editor uib-typeahead="name as progetto.name for progetto in grid.appScope.progetti | filter:$viewValue | limitTo:8" typeahead-min-length="0" ng-required="true" typeahead-editable ="false" data-typeahead-on-select="grid.appScope.typeaheadSelected(row.entity, $item)" /></div></ui-select-wrap>',
headerCellTemplate: $scope.headerTemplate,
cellClass: 'grid-align'
}
但是当我选择函数grid.appScope.typeaheadSelected(row.entity, $item)
时没有被调用。
有什么建议吗?谢谢!