[英]React ag-grid header component is rendering behind row
I have a custom component for my ag-grid header, of a clickable icon that opens a menu.我的 ag-grid header 有一个自定义组件,它是一个可打开的菜单的可点击图标。 This menu opens, but most of it appears behind the rows below the header.
此菜单打开,但大部分出现在 header 下方的行后面。 I know there is a solution for a custom cell that has a popup menu , where you add "overflow: visible" to the cell, and adjust z-indexes for the cell and the other cells.
我知道有一个针对具有弹出菜单的自定义单元格的解决方案,您可以在其中向单元格添加“溢出:可见”,并调整单元格和其他单元格的 z 索引。 I tried that with the header cells but it still is not working.
我尝试使用 header 单元,但它仍然无法正常工作。 I couldn't find a similar question asked anywhere else.
我在其他任何地方都找不到类似的问题。 Does anyone know how to fix this?
有谁知道如何解决这一问题?
This is what it looks like这就是它的样子
Here is my AgGridColumn:这是我的 AgGridColumn:
<AgGridColumn headerComponentFramework={(params) => renderKebabMenuHeader(params)} minWidth={160} headerName="" field="id" cellRenderer="kebabMenuRenderer" cellClass="kebab-menu-cell cell-vertical-align-text-right" headerClass="kebab-menu-cell cell-vertical-align-text-right"/>
renderKebabMenuHeader() simply returns a JSX element of my menu. renderKebabMenuHeader() 只返回我的菜单的 JSX 元素。
I ended up not using the ag-grid header at all for this.我最终没有为此使用 ag-grid header。 Instead I made a div with
position: absolute
instead相反,我用
position: absolute
做了一个 div
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.