EXTJS如何聚焦检查列单元格

发布于 2025-01-08 12:16:15 字数 259 浏览 4 评论 0原文

一直在使用 checkcolumn 插件,我发现当我单击该列中的任何单元格时,它不会突出显示。我假设这意味着细胞没有聚焦。

这样做的效果是,当另一个单元格接收焦点时,每当我单击复选框列中的任何单元格时,网格都会滚动回其最后/当前焦点单元格。我可以向下滚动一半并单击复选框,如果网格开头的文本字段具有焦点,网格将向上滚动。

奇怪的是,当我使用键盘导航时,单元格会按预期突出显示,因此这是一个我不明白的仅鼠标问题。我应该在哪里添加代码以关注检查列中的单元格?

Been working with the checkcolumn plugin, I've discovered that when I click on any cell in that column, it doesn't highlight. I'm going to assume this means that the cell is not focused.

This has the effect of that when another cell receives focus, the grid scrolls back up to its last/current focused cell whenever I click on any cell in the checkbox column. I could scroll halfway down and click on a checkbox and if a textfield at the start of the grid had focus the grid will scroll back up.

Strangely enough when I navigate using the keyboard the cell is highlighted as expected, so this is a mouse-only issue which I don't understand. Where would I add code to focus on the cell in the checkcolumn?

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

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

发布评论

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

评论(1

吾性傲以野 2025-01-15 12:16:15

看起来 checkcolumn 中的 processEvent 方法返回 false 以故意停止选择:

http://docs.sencha.com/ext-js/4-0/source/CheckColumn.html#Ext-ux-CheckColumn

我不知道为什么会这样以及会发生什么如果返回 true,则为后果 -但可以覆盖它并看看我猜:)

Looks like processEvent method in the checkcolumn returns false to stop selection on purpose:

http://docs.sencha.com/ext-js/4-0/source/CheckColumn.html#Ext-ux-CheckColumn

I don't know why that is and what would be the ramification if it returned true - but it possible to override it and see I guess :)

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