mirror of
https://github.com/gosticks/react-table.git
synced 2025-10-16 11:55:36 +00:00
Fixing react warnings (#1495)
* fixing react warnings * changing forgotten names to UNSAFE_
This commit is contained in:
parent
5730544d35
commit
8ea48576b8
@ -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: {},
|
||||
})
|
||||
|
||||
@ -41,7 +41,7 @@ export default ReactTable => {
|
||||
}
|
||||
}
|
||||
|
||||
componentWillReceiveProps(newProps) {
|
||||
UNSAFE_componentWillReceiveProps(newProps) {
|
||||
if (this.state.resized !== newProps.resized) {
|
||||
this.setState(p => ({ resized: newProps.resized }))
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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 })
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user