使用easyui-combobox 做下拉框,需要支持模糊搜索时候,只要一输入内容就会报错


报错内容为:

也就是filter这个方法报错:

解决:重写filter方法,解决报错,同时能够模糊搜索
$('#...').combobox({
filter: function (q, row) {
....
} });
$('#comboboxSelect').combobox({ filter: function (q, row) { var opts = $(this).combobox('options'); row[opts.textField] = row[opts.textField] + ""; return row[opts.textField].toLowerCase().indexOf(q.toString().toLowerCase()) >= 0; } });


被折叠的 条评论
为什么被折叠?



