Fix pinput file

This commit is contained in:
soupette 2018-09-07 12:47:45 +02:00
parent 674e323d88
commit b2d55b13a3
12 changed files with 14 additions and 14 deletions

View File

@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -49,4 +49,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -44,4 +44,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -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}

View File

@ -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 });
}
}

View File

@ -55,4 +55,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -92,4 +92,4 @@
},
"preferGlobal": true,
"license": "MIT"
}
}