问题描述
在我的管理部分,当我编辑项目时,我必须将每个项目附加到父项目。我有一个超过24,000个父项目的列表,按字母顺序列在下拉列表(音乐艺术家列表)中。
In my admin section, when I edit items, I have to attach each item to a parent item. I have a list of over 24,000 parent items, which are listed alphabetically in a drop down list (a list of music artists).
列出所有这些项目的编辑页面在一个下拉菜单中是2MB,对于旧机器,特别是在Internet Explorer中,对于老人机器来说,它变得很疯狂。
The edit page that lists all these items in a drop down menu is 2MB, and it lags like crazy for people with old machines, especially in Internet Explorer.
什么是复制相同功能的好选择,哪里我将需要选择这24,000位艺术家中的1位,而实际上并没有将它们全部预加载到下拉菜单中。
Whats a good alternative to replicate the same function, where I would need to select 1 of these 24,000 artists, without actually having them all pre-loaded into a drop down menu.
推荐答案
而不是填写这么多名字的下拉列表,您可以:
Instead of filling a drop list with so many names you could:
- 创建一个简单的搜索机制,匹配起始名称
- 使用类别(如果有的话)和多个组合框缩小选择
- 与上述相同,具有分类层次结构的某种树结构
- 一个快捷键控件,其中有一个链接或一个按钮,字母表(元类别)
- Create a simple search mechanism where you match the start of a name
- Make use of categories (if any are available) and multiple combo boxes to narrow selection
- Same as above, some sort of tree structure with a categorical hierarchy
- A shortcuts control where there is a link or a button for letter of the alphabet (meta-category)
当然,这取决于您正在实现的堆栈您是否使用AJAX或jQuery,访问db / type。
Of course a lot of this depends on the stack you're implementing e.g. are you using AJAX or jQuery, access to a db/type.
这篇关于巨大下拉列表的替代品(24,000+件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!