AG-1053 Tidy react examples, make more idiomatic

This commit is contained in:
Sean Landsman
2017-11-08 14:45:28 +00:00
parent b030235bbc
commit 983b5974cf
149 changed files with 339 additions and 8856 deletions

View File

@@ -0,0 +1,20 @@
import React, {Component} from "react";
export default class ChildMessageRenderer extends Component {
constructor(props) {
super(props);
}
invokeParentMethod = () => {
let rowIndex = this.props.node.rowIndex;
let headerName = this.props.colDef.headerName;
this.props.context.componentParent.methodFromParent(`Row: ${rowIndex}, Col: ${headerName}`)
};
render() {
return (
<span><button style={{height: 20, lineHeight: 0.5}} onClick={this.invokeParentMethod} className="btn btn-info">Invoke Parent</button></span>
);
}
};