0
我试图在Ang-Grid中使用Angular 1实现typeahead。ag-Grid文档站点中显示的typeahead实现使用的是ng2-typeahead,它是一个Angular 2 typeahead。带ag网格的Typeahead
由于我正在使用的应用程序是基于Angular 1.5的,我尝试使用单元编辑器实现Angular typehead(ui.bootstrap.typeahead)。不知何故,它似乎并没有在网格中工作。我试图带入的列是'释放'。我创建的单元格编辑器是'ReleaseEditor'。我正在使用实时JSON服务来获取数据。如果somone能够帮助我,这将是一件好事。
细胞编辑器创建的
function ReleaseEditor() {
}
ReleaseEditor.prototype.init = function (params) {
this.eInput = document.createElement('input');
this.eInput.setAttribute("typeahead", "suggestion for suggestion in cities($viewValue)");
this.eInput.setAttribute("typeahead-wait-ms", "300");
this.eInput.setAttribute("ng-model", "result");
this.eInput.value = params.value;
};
ReleaseEditor.prototype.getGui = function() {
return this.eInput;
};
ReleaseEditor.prototype.afterGuiAttached = function() {
this.eInput.focus();
};
ReleaseEditor.prototype.getValue = function() {
return this.eInput.value;
};
This is the link to the plnkr。