Fixing react warnings (#1495)

* fixing react warnings

* changing forgotten names to UNSAFE_
This commit is contained in:
Christian Kellner 2019-09-04 16:07:44 +01:00 committed by Tanner Linsley
parent 5730544d35
commit 8ea48576b8
4 changed files with 5 additions and 5 deletions

View File

@ -66,7 +66,7 @@ export const advancedExpandTableHOC = TableComponent =>
// after initial render if we get new
// data, columns, page changes, etc.
// we reset expanded state.
componentWillReceiveProps () {
UNSAFE_componentWillReceiveProps () {
this.setState({
expanded: {},
})

View File

@ -41,7 +41,7 @@ export default ReactTable => {
}
}
componentWillReceiveProps(newProps) {
UNSAFE_componentWillReceiveProps(newProps) {
if (this.state.resized !== newProps.resized) {
this.setState(p => ({ resized: newProps.resized }))
}

View File

@ -1,6 +1,6 @@
export default Base =>
class extends Base {
componentWillMount () {
UNSAFE_componentWillMount () {
this.setStateWithData(this.getDataModel(this.getResolvedState(), true))
}
@ -8,7 +8,7 @@ export default Base =>
this.fireFetchData()
}
componentWillReceiveProps (nextProps, nextState) {
UNSAFE_componentWillReceiveProps (nextProps, nextState) {
const oldState = this.getResolvedState()
const newState = this.getResolvedState(nextProps, nextState)

View File

@ -63,7 +63,7 @@ export default class ReactTablePagination extends Component {
}
}
componentWillReceiveProps (nextProps) {
UNSAFE_componentWillReceiveProps (nextProps) {
if (this.props.page !== nextProps.page) {
this.setState({ page: nextProps.page })
}