AG-420 Improve React implementation
This commit is contained in:
18
src/groupedRowInnerRendererExample/MedalRenderer.jsx
Normal file
18
src/groupedRowInnerRendererExample/MedalRenderer.jsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import React, {Component} from "react";
|
||||
|
||||
export default class MedalRenderer extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.country = this.props.node.key;
|
||||
this.gold = this.props.data.gold;
|
||||
this.silver = this.props.data.silver;
|
||||
this.bronze = this.props.data.bronze;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<span>{this.country} Gold: {this.gold}, Silver: {this.silver}, Bronze: {this.bronze}</span>
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user