(prevProps)
| 52 | } |
| 53 | |
| 54 | componentDidUpdate (prevProps) { |
| 55 | if (initialValue(prevProps) !== initialValue(this.props)) { |
| 56 | this.setState({ updated: true }) |
| 57 | this.timeout = setTimeout(() => this.setState({ updated: false }), 700) |
| 58 | } |
| 59 | if (this.props.editing === true && prevProps.editing === false) { |
| 60 | const value = this.props.clearing ? '' : initialData(this.props) |
| 61 | this.setState({ value, reverting: false }) |
| 62 | } |
| 63 | |
| 64 | if ( |
| 65 | prevProps.editing === true && |
| 66 | this.props.editing === false && |
| 67 | !this.state.reverting && |
| 68 | !this.state.committing && |
| 69 | this.state.value !== initialData(this.props) |
| 70 | ) { |
| 71 | this.props.onChange(this.props.row, this.props.col, this.state.value) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | componentWillUnmount () { |
| 76 | clearTimeout(this.timeout) |
nothing calls this directly
no test coverage detected