The use of autoheight and cellrendererframework fails accidentally.
vivianus-chan opened this issue · 0 comments
vivianus-chan commented
autoHeight works:
{
headerName: "附件",
field: "ploblemRecordId",
cellRendererFramework: ProblemFiles,
autoHeight: true,
},
class ProblemFiles extends React.Component<ICellRendererParams> {
render() {
const {value} = this.props
return (
<div style={{overflow: "hidden", marginBottom: "1px"}}>
{value && value.split(",").map((item: string, index: number) => <SingleFile fileUrl={item} key={index} />)}
</div>
)
}
}
autoHeight doesn't work:
Autoheight will always fail on a certain line
{
headerName: "附件",
field: "ploblemRecordId",
autoHeight: true,
cellRendererFramework: (param: ICellRendererParams) => {
return (
<div style={{overflow: "hidden", marginBottom: "1px"}}>
{param.value && param.value.split(",").map((item: string, index: number) => <SingleFile fileUrl={item} key={index}
/>)}
</div>
)
}
},