Fix controlled fileList prop, close #2236

This commit is contained in:
afc163 2016-07-09 15:08:39 +08:00
parent 2a64384852
commit ec8a0821cd

View File

@ -206,9 +206,9 @@ export default class Upload extends React.Component {
}
onChange = (info) => {
this.setState({
fileList: info.fileList,
});
if (!('fileList' in this.props)) {
this.setState({ fileList: info.fileList });
}
this.props.onChange(info);
}