我已将这些代码行用于地址标题列中的附加图像文本区域。
````````
"headerName: "Address",
field: "Address",
width: 350,
**cellEditor: 'agLargeTextCellEditor'**
````````````
但是“agLargeTextCellEditor”的限制是它只接受 200 个字符。但我的要求是最多 500 个字符。那么我们可以在 ag-grid 中使用任何自定义单元格编辑器吗?或任何替代解决方案?
注意:我知道你们中的一些人会建议我使用“agRichSelectCellEditor”,但它仅在 ag-Grid Enterprise 中可用,所以我不能使用它。
agLargeTextCellEditor 的文档说字符数以及行数和列数是可配置的。默认的 'maxLength' 为 200,但您可以提供自己的值。
我没有试过这个,但从文档中,看起来你应该修改你的 columnDef 看起来像:
{
headerName: 'Address',
field: 'Address',
width: 350,
cellEditor: 'agLargeTextCellEditor'
cellEditorParams: {maxLength: 500}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句