Add debug statements
This commit is contained in:
parent
52fed59c95
commit
cb4a5c0fca
@ -195,6 +195,8 @@ export default function withFileControl({ forImage } = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps) {
|
shouldComponentUpdate(nextProps) {
|
||||||
|
console.log('[withFileControl][shouldComponentUpdate] nextProps', nextProps);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Always update if the value or getAsset changes.
|
* Always update if the value or getAsset changes.
|
||||||
*/
|
*/
|
||||||
@ -217,6 +219,8 @@ export default function withFileControl({ forImage } = {}) {
|
|||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
const { mediaPaths, value, onRemoveInsertedMedia, onChange } = this.props;
|
const { mediaPaths, value, onRemoveInsertedMedia, onChange } = this.props;
|
||||||
const mediaPath = mediaPaths.get(this.controlID);
|
const mediaPath = mediaPaths.get(this.controlID);
|
||||||
|
console.log('[withFileControl][shouldComponentUpdate] mediaPath', mediaPath);
|
||||||
|
console.log('[withFileControl][shouldComponentUpdate] value', value);
|
||||||
if (mediaPath && mediaPath !== value) {
|
if (mediaPath && mediaPath !== value) {
|
||||||
onChange(mediaPath);
|
onChange(mediaPath);
|
||||||
} else if (mediaPath && mediaPath === value) {
|
} else if (mediaPath && mediaPath === value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user