ag-grid/ag-grid-react-example

The use of autoheight and cellrendererframework fails accidentally.

vivianus-chan opened this issue · 0 comments

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>
        )
    }
}

123E605A-EBAB-4482-804C-7EA289681F2E

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>
                )
            }
},

A0E2CCDD-D75E-4ed3-A60B-A3098ED18B5B