Commit 915ef261 authored by Evren Kutar's avatar Evren Kutar

typeahead custom search fix

parent 7281efe5
......@@ -24,7 +24,7 @@
type="text"
autocomplete="off"
ng-model="$$value$$"
uib-typeahead="item as item.name for item in getTitleMap($viewValue)"
uib-typeahead="item as item.name for item in form.getTitleMap($viewValue)"
typeahead-wait-ms="500"
typeahead-loading="loadingTitleMap"
typeahead-on-select="form.onDropdownSelect($item, form.name)"
......
......@@ -778,13 +778,16 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
scope.form[scope.form.indexOf(k)] = {
type: "template",
title: v.title,
widget: v.widget,
getTitleMap: function (viewValue) {
// v.view is where that value will looked up
var searchData = {
"url": v.wf,
"wf": v.wf,
"view": v.view,
"query": viewValue
"form_params": {
"url": v.wf,
"wf": v.wf,
"view": v.view,
"query": viewValue
}
};
generator.get_list(searchData).then(function (res) {
// response must be in titleMap format
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment