Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow override onProgress on Upload #5260

Merged
merged 1 commit into from
Mar 10, 2017
Merged

Allow override onProgress on Upload #5260

merged 1 commit into from
Mar 10, 2017

Conversation

minwe
Copy link
Contributor

@minwe minwe commented Mar 10, 2017

allow user to disable upload progress listener

@see react-component/upload#33 (comment)

and react-component/upload#65

@mention-bot
Copy link

@minwe, thanks for your PR! By analyzing the history of the files in this pull request, we identified @afc163, @ystarlongzi and @simaQ to be potential reviewers.

@afc163
Copy link
Member

afc163 commented Mar 10, 2017

- assign({}, this.props, {
-   onStart: this.onStart,
-   onError: this.onError,
-   onProgress: this.onProgress
-   onSuccess: this.onSuccess,
- });
+ assign({}, {
+  onStart: this.onStart,
+  onError: this.onError,
+  onProgress: this.onProgress
+  onSuccess: this.onSuccess,
+ }, this.props);

We can just switch props order so you can set <Upload onProgress={null} /> for your very special situation. listenUploadProgress is a prop hard to understand.

@afc163
Copy link
Member

afc163 commented Mar 10, 2017

image

@minwe
Copy link
Contributor Author

minwe commented Mar 10, 2017

@afc163 changed and rebased

@afc163 afc163 changed the title feat: add listenUploadProgress prop to Upload Allow override onProgress on Upload Mar 10, 2017
@afc163
Copy link
Member

afc163 commented Mar 10, 2017

PR to master

@minwe minwe changed the base branch from feature-2.9 to master March 10, 2017 10:26
@afc163
Copy link
Member

afc163 commented Mar 10, 2017

rebase master again, there is still a extra commit.

@minwe
Copy link
Contributor Author

minwe commented Mar 10, 2017

Rebase done.

@afc163 afc163 merged commit bbe294e into ant-design:master Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants