AG-1905 Future proof ag-grid-react by removing dependency on unstable_renderSubtreeIntoContainer
This commit is contained in:
@@ -64,9 +64,8 @@
|
||||
"d3": "4.9.1",
|
||||
"file-loader": "0.11.1",
|
||||
"lodash": "4.17.4",
|
||||
"react": "16.0.0",
|
||||
"react-dom": "16.0.0",
|
||||
"react-dom-factories": "1.0.2",
|
||||
"react": "16.4.1",
|
||||
"react-dom": "16.4.1",
|
||||
"react-redux": "5.0.x",
|
||||
"react-router-dom": "4.2.x",
|
||||
"redux": "3.6.x",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, {Component} from "react";
|
||||
import * as PropTypes from "prop-types";
|
||||
|
||||
import {AgGridReact} from "ag-grid-react";
|
||||
import {connect} from "react-redux";
|
||||
@@ -45,6 +46,9 @@ class GridComponent extends Component {
|
||||
columnDefs={this.state.columnDefs}
|
||||
rowData={this.props.rowData}
|
||||
|
||||
reactNext={true}
|
||||
reduxStore={this.context.store} // must be supplied when using redux with reactNext
|
||||
|
||||
// events
|
||||
onGridReady={this.onGridReady}>
|
||||
</AgGridReact>
|
||||
@@ -53,6 +57,10 @@ class GridComponent extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
GridComponent.contextTypes = {
|
||||
store: PropTypes.object // must be supplied when using redux with reactNext
|
||||
};
|
||||
|
||||
// pull off row data changes
|
||||
export default connect(
|
||||
(state) => {
|
||||
|
||||
@@ -33,5 +33,8 @@ export default connect(
|
||||
currencySymbol: state.currencySymbol,
|
||||
exchangeRate: state.exchangeRate
|
||||
}
|
||||
}
|
||||
},
|
||||
null,
|
||||
null,
|
||||
{ withRef: true } // must be supplied for react/redux when using GridOptions.reactNext
|
||||
)(PriceRenderer);
|
||||
Reference in New Issue
Block a user