From 897315784dfd7bd42148049405e2322e9cdd6239 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 8 Sep 2015 18:26:18 +0800 Subject: [PATCH] Fix info.fileList in multiple upload --- components/upload/index.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/upload/index.jsx b/components/upload/index.jsx index c261f09769..d027edf0e8 100644 --- a/components/upload/index.jsx +++ b/components/upload/index.jsx @@ -80,14 +80,19 @@ const AntUpload = React.createClass({ return { fileList: prevState.fileList.concat(info.file) }; + }, function() { + info.fileList = this.state.fileList; + this.props.onChange(info); }); } else { this.setState({ fileList: info.fileList + }, function() { + info.fileList = this.state.fileList; + this.props.onChange(info); }); } } - this.props.onChange(info); }, getDefaultProps() { return {