mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
Fix pinput file
This commit is contained in:
parent
674e323d88
commit
b2d55b13a3
@ -43,4 +43,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -43,4 +43,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -43,4 +43,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -49,4 +49,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -44,4 +44,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -43,4 +43,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -43,4 +43,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -137,7 +137,7 @@ class InputFile extends React.Component {
|
||||
position={this.state.position}
|
||||
updateFilePosition={this.updateFilePosition}
|
||||
/>
|
||||
<label style={{"margin-bottom": 0, width: '100%'}}>
|
||||
<label style={{ marginBottom: 0, width: '100%' }}>
|
||||
<input
|
||||
className={styles.inputFile}
|
||||
multiple={multiple}
|
||||
|
||||
@ -44,10 +44,10 @@ class InputFileWithErrors extends React.PureComponent {
|
||||
this.updateState({ label: null });
|
||||
}
|
||||
// Check if errors have been updated during validations
|
||||
if (nextProps.didCheckErrors !== this.props.didCheckErrors) {
|
||||
if (prevProps.didCheckErrors !== this.props.didCheckErrors) {
|
||||
// Remove from the state the errors that have already been set
|
||||
const errors = isEmpty(nextProps.errors) ? [] : nextProps.errors;
|
||||
this.setState({ errors });
|
||||
const errors = isEmpty(this.props.errors) ? [] : this.props.errors;
|
||||
this.updateState({ errors });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -55,4 +55,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -43,4 +43,4 @@
|
||||
"npm": ">= 5.3.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
@ -92,4 +92,4 @@
|
||||
},
|
||||
"preferGlobal": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user