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。