Vaadin 22 打开的 ComboBox 位置不正确
我正在将 Vaadin 应用程序从 14 升级到 22。
该应用程序具有一些带有组合框的对话框,其中包含数十个项目。
在版本 14 中,当打开靠近对话框底部的组合框(也靠近屏幕底部,除非浏览器窗口非常大)时,项目列表会自动定位在上方输入字段,以便可以看到相当数量的项目。
升级到版本 22 后,这不再起作用:项目列表出现在输入字段的下方,即使只有一两个项目的空间,这使得它很难用于用户。
我确实注意到,当在输入字段下方打开组合框时,调整浏览器窗口的大小会导致项目列表立即翻转到输入字段上方,显示更多项目。所以这似乎是一个错误,最初位置计算不正确。
有没有办法通过以编程方式强制重新计算位置来解决这个问题?
I'm upgrading a Vaadin application from 14 to 22.
The app features some dialogs with combo boxes that have dozens of items.
In version 14, when opening a combo box near the bottom of the dialog (which is also near the bottom of the screen unless the browser window is very large), the list of items automatically gets positioned above the input field, so that a decent amount of items are visible.
After the upgrade to version 22, this doesn't work anymore: the list of items appears below the input field, even if there is only space for one or two items, which makes it hard to use for the user.
I did notice that when the combo box is opened below the input field, resizing the browser window causes the list of items to immediately flip to above the input field, showing more items. So it seems to be a bug where the position is not properly calculated initially.
Is there any way to work around this by forcing a recalculation of the position programmatically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论