如何根据内容设置单元格编辑器的高度?
How to set height of cell editor based on content?
我有这个 ag-grid table 和 cellEditor agRichSelectCellEditor
我希望默认情况下将高度设置为与内容相同的大小.在所附的图片中,我的 agRichSelectCellEditor
底部有 space,我希望编辑器的大小与内容的大小相同,并删除底部的 space。 如果有 4 个以上的选项,它工作正常,底部没有 space。
cellEditor: "agRichSelectCellEditor"
这似乎是 ag-grid 单元格编辑器 中的标准,如果您在 cellEditor 示例中单击男性 [= =29=]官方文档这里似乎也有空的space(见下图)。这是 ag-grid 单元格编辑器文档的 link,其中包括具有相同“问题”的 table 示例:Cell editing Ag-grid-angular documentation
Plunker 案例示例:Ag-grid agRichSelectCellEditor example
是否可以修改默认的最小高度以依赖于 ag-grid 中的内容大小?
以下样式应使列表 height
适合其内容的大小:
div.ag-rich-select .ag-rich-select-list {
width: 100%;
min-width: 200px;
background-color: lightgreen;
height: 100% !important;
}
但是,样式不会被覆盖。看起来应该通过一些代码覆盖样式,例如 it is described in the docs or by adding the above class 到 style.scss
文件。
我有这个 ag-grid table 和 cellEditor agRichSelectCellEditor
我希望默认情况下将高度设置为与内容相同的大小.在所附的图片中,我的 agRichSelectCellEditor
底部有 space,我希望编辑器的大小与内容的大小相同,并删除底部的 space。 如果有 4 个以上的选项,它工作正常,底部没有 space。
cellEditor: "agRichSelectCellEditor"
这似乎是 ag-grid 单元格编辑器 中的标准,如果您在 cellEditor 示例中单击男性 [= =29=]官方文档这里似乎也有空的space(见下图)。这是 ag-grid 单元格编辑器文档的 link,其中包括具有相同“问题”的 table 示例:Cell editing Ag-grid-angular documentation
Plunker 案例示例:Ag-grid agRichSelectCellEditor example
是否可以修改默认的最小高度以依赖于 ag-grid 中的内容大小?
以下样式应使列表 height
适合其内容的大小:
div.ag-rich-select .ag-rich-select-list {
width: 100%;
min-width: 200px;
background-color: lightgreen;
height: 100% !important;
}
但是,样式不会被覆盖。看起来应该通过一些代码覆盖样式,例如 it is described in the docs or by adding the above class 到 style.scss
文件。