我使用 jquery ui 自动完成作为多列自动完成。代码如下
this.$('[data-sandbar="searchbox"]').mcautocomplete({
showHeader: true,
columns: [{
name: 'First Name',
width: '70px',
valueField: 'value'
},
{
name: 'Last Name',
width: '70px',
valueField: 'LastName'
},
{
name: 'DOB',
width: '50px',
valueField: 'DOB'
}],
select: function (event, ui) {
window.location.hash = ui.item.name;
return false;
},
minLength: -1,
pageSize: 50,
autoFocus: false,
source: function (request, response) {
self.model.fetch({
data: {
searchText: text,
sortBy: '',
pageNum: 1,
pageSize: 50,
bHotList: false,
sortOrder: 'Desc',
patientId: 0,
include_entities: true
},
success: function (data) {
var availableTags = [];
$.each(data.attributes, function (val, patient) {
if (patient != "" && patient != null) {
availableTags[val] = {
name: "#patient/" + patient.PatientId,
value: patient.FirstName,
LastName: patient.LastName,
DOB: patient.DOB
};
}
});
response(availableTags);
},
error: function (e) {
console.log(e);
}
});
}
});
我面临的问题是,当我将鼠标悬停在自动完成下拉菜单上时,鼠标悬停会将列表显示块更改为无。请帮忙...