AG-420 Improve React implementation
This commit is contained in:
@@ -6,16 +6,30 @@ import StockDetailPanel from "./StockDetailPanel.jsx";
|
||||
export default class extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
selectedSymbol: null
|
||||
};
|
||||
|
||||
this.onRowClicked = this.onRowClicked.bind(this);
|
||||
}
|
||||
|
||||
onRowClicked(selectedSymbol) {
|
||||
this.setState({
|
||||
selectedSymbol
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<div style={{float: "left", marginRight: 25}}>
|
||||
<LiveUpdatesGrid selectedExchange={this.props.selectedExchange}></LiveUpdatesGrid>
|
||||
<LiveUpdatesGrid selectedExchange={this.props.selectedExchange}
|
||||
onRowClicked={this.onRowClicked} />
|
||||
</div>
|
||||
<div style={{float: "left"}}>
|
||||
<StockDetailPanel></StockDetailPanel>
|
||||
<StockDetailPanel selectedSymbol={this.state.selectedSymbol}
|
||||
exchangeName={this.props.selectedExchange.name}/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user