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

Comments

Projects
None yet
3 participants
@monkindey
Contributor

monkindey commented Oct 11, 2017

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

This comment has been minimized.

Contributor

benjycui commented Oct 11, 2017

Just PR to branch antd-3.0, thanks!

@monkindey

This comment has been minimized.

Contributor

monkindey commented Oct 12, 2017

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

@monkindey

This comment has been minimized.

Contributor

monkindey commented Oct 12, 2017

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

image

@afc163

This comment has been minimized.

Member

afc163 commented Oct 12, 2017

@monkindey

This comment has been minimized.

Contributor

monkindey commented Oct 12, 2017

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

@monkindey

This comment has been minimized.

Contributor

monkindey commented Oct 12, 2017

yarn test test is all right

image

@monkindey

This comment has been minimized.

Contributor

monkindey commented Oct 12, 2017

I created a feature PR.

@monkindey

This comment has been minimized.

Contributor

monkindey commented Oct 14, 2017

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