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

message.error/success/... duration argument is optional #7857

Closed
monkindey opened this issue Oct 11, 2017 · 8 comments
Closed

message.error/success/... duration argument is optional #7857

monkindey opened this issue Oct 11, 2017 · 8 comments
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@monkindey
Copy link
Contributor

What problem does this feature solve?

Because duration have the default value.

message.error(content, duration, onClose)

Sometime I want to use onClose, but have to reassign value to duration even equal to the default value.

What does the proposed API look like?

I can use it two way.

message.error(content, duration, onClose)
message.error(content, onClose)

duration is optional, we can identify the onClose using the typeof

@benjycui benjycui added the help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. label Oct 11, 2017
@benjycui
Copy link
Contributor

Just PR to branch antd-3.0, thanks!

@monkindey
Copy link
Contributor Author

monkindey commented Oct 12, 2017

Hi, @benjycui . Do you use prettier to format ts code in antd project ?

@monkindey
Copy link
Contributor Author

I run the npm run lint and no warning or error happen, Is what it mean my code follow your eslint?

image

@afc163
Copy link
Member

afc163 commented Oct 12, 2017

@monkindey yep

@monkindey
Copy link
Contributor Author

OK, Thanks. Is there still other step to check before send a PR?

@monkindey
Copy link
Contributor Author

yarn test test is all right

image

@monkindey
Copy link
Contributor Author

I created a feature PR.

@monkindey
Copy link
Contributor Author

I am going to close it because of the #7874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

No branches or pull requests

3 participants