如何避免重复下拉列表输入的数据重复?

发布于 2024-09-26 16:17:43 字数 764 浏览 5 评论 0原文

我有一个应该相对轻量级的网页,问题是我有一个表格,每行都包含可编辑的用户数据,并且数据包括一个包含数百个选项的下拉列表。

我反对使用这么多的值,但我想我无法想出一个令人满意的解决方案;因此巨大的下拉列表卡住了(这里我们讨论的是每个下拉列表35kbytes的选项)

这并不意味着每个下拉都必须有数据不过,我一直在寻找无需太多麻烦即可管理的方法。目前我一直在考虑:

  • 用单击时的数据填充选定的下拉列表
  • 创建空的下拉列表,并且只有一个完整的下拉列表,我将在适用时与选定的下拉列表交换
  • 强制仅在单击后才可以编辑该行在 edit 命令上。我真的很想避免这种情况,因为我认为我们应该最大限度地减少用户的点击次数
  • 创建一个带有较小下拉列表的可填充字段。用户可以输入他们的单词并选择最接近的匹配项,或者直接从较短的列表中选择

我试图使列表尽可能为空,因为该表应该由最终的 jquery 插件包装,该插件将使其可排序,并交换 35k每列点击每行的数据是昂贵的。

您对避免这种数据重复的方法有什么建议吗?您认为我真的应该推动这些数据的清理吗?有什么好的实践或模式来解决这个特定问题? 我正在考虑这里的任何答案,所以请毫不犹豫地建议一个 jquery 插件,或者客户端上的缓存解决方案,或者任何可能有助于减轻我的数据膨胀的东西......


编辑:自动完成字段是一个很好的答案,但如果有人找到一种方法以鼠标驱动的方式做到这一点,请毫不犹豫地告诉我

I have a webpage that should be relatively lightweight, the problem is that i've got a table with editable user data on each line and the data includes a dropdownlist with hundreds of options.

i've argued against the use of so much values but i guess i wasn't able to come up with a satisfying solution; so the ginormous dropdownlist stuck (we're talking 35kbytes of options per drop down list, here)

It doesn't mean that the data has got to be there for each drop down list, though, and i've been looking for ways to manage that without too much hassle. Currently i've been considering:

  • Filling the selected drop down list with the data on click
  • Creating empty drop down lists and only one full drop down list that i would swap with the selected one when applicable
  • Forcing the line to be editable only after a click on an edit command. i'd really like to avoid this one since i think we should minimize the number of clicks for the user
  • Creating a fillable field with a smaller drop down list attached. User could either type their word and select the nearest match or directly select from the shorter list

I'm trying to keep the lists as empty as possible because the table should be wrapped by an eventual jquery plugin that would render it sortable, and swapping 35k of data per line on each column click is expensive.

Do you have any recommendations regarding a way to avoid this repetition of data? Do you think i should really push for the cleanup of this data? Any good practice or pattern to address this specific problem?
I'm considering any answer here, so don't hesitate to suggest a jquery plugin, or a cache solution on the client, or whatever may help alleviate my data bloat...


Edit: a autocomplete field is a good answer, but if one finds a way to do it in a mouse-driven way, don't hesitate to tell me

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最美不过初阳 2024-10-03 16:17:43

自动完成查找的完美候选者。

A perfect candidate for an autocomplete lookup.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文