mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
Fix controlled fileList prop, close #2236
This commit is contained in:
parent
2a64384852
commit
ec8a0821cd
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user