简体   繁体   English

React-Virtualized:CellRender进入下一行

[英]React-Virtualized : CellRender goes under next Row

I'm build app with React-virtualized Table. 我正在使用React虚拟表构建应用程序。 I added some custom cell render inside each Row. 我在每行中添加了一些自定义单元格渲染。 Like Label, or some Img. 像标签,或一些图。

Everything works great, but there's a weird behavior. 一切都很好,但是有一个奇怪的行为。

Inside one cell, I added a simple Dropdown to let user choose some value. 在一个单元格内,我添加了一个简单的下拉菜单,以允许用户选择一些值。 Actually, my dropdown render go UNDER the next row. 实际上,我的下拉渲染在下一行下进行。 After a click, the dropdown expand and keep under next row. 单击后,下拉列表将展开并保留在下一行下。

Is there something that I missed ? 有什么我想念的吗? Is it normal behavior ? 这是正常行为吗?

The dropdown menu is getting clipped by the parent row's overflow: hidden style. 下拉菜单正受到父行的overflow: hidden样式的限制。 (It may also be obscured by the following row's background-color if you've set one.) (如果设置了下一行的background-color则它也可能会被其遮盖。)

Here's an example of what I'm talking about wrt clipping: http://plnkr.co/edit/9iMzJh?p=preview 这是我正在谈论wrt裁剪的示例: http : //plnkr.co/edit/9iMzJh?p=preview

I suggest using something react-portal to avoid clipping problems. 我建议使用一些反应门户,以避免裁剪问题。 I've used this before with Table and have been pretty happy with it. 我之前在Table使用过此功能,对此感到非常满意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM