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