本文介绍了如何使用淘汰赛自动完成和分页..请告诉siple演示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为autocomplete usng knocout创建自定义绑定,但我无法获得。我也尝试使用jquery自动完成...但它没有工作......
在这里输入代码
i am trying to create a custom binding for autocomplete usng knocout but i am unable to get. also i tried to use jquery auto complete ... but its not getting worked...
enter code here
var self = this;
self.employeedata = ko.observableArray([]);
//var employeedata = [];
for (i = 0; i < Showdatarecords.empdetails().length ; i++)
{
self.employeedata.push({
label: Showdatarecords.empdetails()[i].name(),
value: Showdatarecords.empdetails()[i].empID()
});
}
Showdatarecords.empdetails()是一个可观察的数组,我获得了员工列表,我正在推动另一个数组变量的记录,并使用该变量作为来源
Showdatarecords.empdetails() is an observble array where i am getting list of employee and i am pushing record in another array variable and using that variable as source
$(function () {
$("#autocomplete").autocomplete({
source: self.employeedata(),
//source :availableTags,
autoFocus: true
});
});
它不工作.enter code here`
its not working.`enter code here`
推荐答案
它不起作用.enter code here here
its not working.`enter code here`
这篇关于如何使用淘汰赛自动完成和分页..请告诉siple演示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!