还没有OPTGROUP吗?

发布于 2024-08-08 10:37:22 字数 108 浏览 2 评论 0原文

我在 3 年前的 dojo trac 中读到一个关于 dojo 组合框需要实现选项组的担忧。我使用的是 1.3.2 版本,但我的组合失败了。这么长时间以来,选项组仍然不受支持吗?

谢谢。

I read in the dojo trac from 3 years ago a concern that dojo combobox needs to implement option groups. I am using version 1.3.2 and my combo is failing. Are the option groups still not supported after all this time?

Thanks.

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

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

发布评论

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

评论(2

半岛未凉 2024-08-15 10:37:22

似乎没有办法在组合框小部件中使用 optgroups。那张票已被关闭,并且没有新的票被打开。也没有一种真正的方法可以在 dojo.data 中一致地表示数据。不过,可以通过编辑 dijit 创建自定义解决方案,只需以对您的应用程序有意义的方式管理 optgroup 即可。

There doesn't seem to be a way to use optgroups in the combobox widget. That ticket was closed and no new one was ever opened. There is also not really a way the data could be represented consistently in dojo.data either. It would be possible to create a custom solution to this by editing the dijit though, just manage the optgroups in the way that makes sense for your application.

泛泛之交 2024-08-15 10:37:22

如果您愿意使用类似的选择小部件,您可以考虑使用 dijit-select-optgroup

dijit-select-optgroup 基本上是 dijit/form/Select 的自定义版本,其中包括选项分组(类似于 html

更多信息:
https://github.com/gibbok/dijit-select-optgroup

现场演示:
https://gibbok.github.io/dijit-select-optgroup

免责声明:我拥有这个仓库:)。

You could consider using dijit-select-optgroup if you are willing to use a Select alike widget.

dijit-select-optgroup is basically a custom version of dijit/form/Select which includes grouping of options (similar to html <select> element with <optgroup>).

More info:
https://github.com/gibbok/dijit-select-optgroup

Live demo:
https://gibbok.github.io/dijit-select-optgroup

Disclaim: I own this repo :).

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