鼠标悬停时Jquery UI Multicolumn自动完成下拉菜单消失

Jquery UI Multicolumn autocomplete dropdown disappears on mouse hover

本文关键字:下拉菜单 消失 Multicolumn 悬停 Jquery UI 鼠标      更新时间:2023-09-26

我使用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);
                        }
                    });
                }
            });

我面临的问题是,当我将鼠标悬停在自动完成下拉菜单上时,鼠标悬停会将列表显示块更改为无。请帮忙。。。

可能是一个悬停事件在自动完成多选组合中注册,导致列表的显示属性发生更改。

谢谢。