Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

The use of autoheight and cellrendererframework fails accidentally. #53

Open
vivianus-chan opened this issue Aug 20, 2021 · 0 comments
Open

Comments

@vivianus-chan
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant