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

add onPreview onRemove override on upload. #1240

Merged
merged 1 commit into from
Apr 5, 2016

Conversation

joesonw
Copy link
Contributor

@joesonw joesonw commented Mar 21, 2016

(Regarding #1221 )
Add onRemove and onPreview property to Upload

This allows user to customize how they ware behaved. (e.g, I don't want preview to open up the image in a new window, instead, I want to add it to the text editor, etc.)

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @afc163, @benjycui and @ikobe to be potential reviewers

@@ -172,11 +172,21 @@ const AntUpload = React.createClass({
}
},

handlePreview(file) {
if ('onPreview' in this.props) {
this.props.onPreview(file);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.preventDefault(); ?

否则会跳转吧。

@benjycui
Copy link
Contributor

可以加个 Demo 并更新下文档?

@afc163
Copy link
Member

afc163 commented Mar 30, 2016

@afc163 afc163 merged commit d584b20 into ant-design:develop-1.0.0 Apr 5, 2016
@afc163
Copy link
Member

afc163 commented Apr 5, 2016

非常感谢贡献~

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

4 participants