-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
render:done回调函数中无法区分是调用哪个API触发的render:done事件 #2920
Comments
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
👋 @linkun-wang, please use our idea board to request new features. |
render:done回调是移除了吗?api为啥找不到这个回调了 |
@hhzhldhjl 是的,移除了,在 2.x 版本中大部分场景是不需要再回调中操作的。 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
问题描述
如果设置了异步加载
async:true
,那么在调用fromJSON、resetCell、clearCells、addNode、Cell.attr/setAttrs等会触发画布重绘的API时,如果没有配置silent:true,都会触发render:done事件,但是无法区分是在哪个操作/哪个API后触发的该事件。重现链接
https://codesandbox.io/s/render-donece-shi-smvtib
重现步骤
预期行为
{testKey:'testValue'}
,可以在render:done
回调中接收到该自定义选项平台
屏幕截图或视频(可选)
补充说明(可选)
业务场景:有一些逻辑仅仅是在初始化完成(比如调用了fromJSON)后才需要执行,但是现在很多操作都可以触发render:done,在render:done回调中无法区分是哪个操作触发的render:done
The text was updated successfully, but these errors were encountered: