question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recommend:develop a feature of callback function to the component of Message

See original GitHub issue

现在的参数配置有

message.success(content, duration)

一个content、一个duration、常用的感觉就是加一个content的调用方式吧,第二个,场景不是特别大,但是有一个使用场景使用比较多,当message消失的时候,需要做一个些事情,比如刷新浏览器。 也不是不需要duration这个参数,判断第二个参数是object就是配置了,如果是function就是回调,第三个参数也可以是配置,{ duration , top } 这样子也和全局config一致配置了。

现在一般都是知道duration了,设置个定时器setTimeout( callback , duration )。然后去做一些事情,有点繁琐了。

大家觉得怎么样。

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
afc163commented, Feb 27, 2017

Actually, I added onClose in 2015: https://github.com/ant-design/ant-design/commit/1e5271491e33a583af22a8693f6a57446ec6d9d4

I don’t know why I forgot the documentation… 😅

1reaction
BANG88commented, Feb 27, 2017

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Callback Functions – What are Callbacks in JS and ...
Callbacks make sure that a function is not going to run before a task is completed but will run right after the task...
Read more >
What is a Callback Function in JavaScript? - Topcoder
A callback function is one of the superpowers of JavaScript. It is the way JavaScript passes a function into another function as an...
Read more >
Callback function - IONOS
The function is only called and executed once a specific event has occurred. As previously mentioned, callback functions are used in a variety ......
Read more >
Callback functions in C++ - Stack Overflow
One reason to use callbacks is to write generic code which is independant from the logic in the called function and can be...
Read more >
Callback function - MDN Web Docs Glossary: Definitions of ...
A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found