Created
April 10, 2019 10:56
-
-
Save maxkoretskyi/1b0399396eff2816912a7639b58f3510 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AgGridReact extends React.Component { | |
gridOptions: AgGrid.GridOptions; | |
componentDidMount() { | |
... | |
let gridOptions = this.props.gridOptions || {}; | |
if (AgGridColumn.hasChildColumns(this.props)) { | |
gridOptions.columnDefs = AgGridColumn.mapChildColumnDefs(this.props); | |
} | |
this.gridOptions = AgGrid.ComponentUtil.copyAttributesToGridOptions(gridOptions, this.props); | |
// don't need the return value | |
new AgGrid.Grid(this.eGridDiv, this.gridOptions, gridParams); | |
this.api = this.gridOptions.api; | |
this.columnApi = this.gridOptions.columnApi; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment