-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Tabs 切换标签的时候,提供一个类似 Router 中的 CanDeactivate 钩子 #4432
Comments
Translation of this issue:Tabs tag switching time, a similar hook Router in CanDeactivateWhat problem does this feature solve?Requirements: Before switching labels, need to do some validation, only in the case of verified before they can leave the current tab. What does the proposed API look like?
|
感觉函数签名最好是这样: export type ShouldPerformSelectionFn = (fromIndex: number, toIndex: number) => boolean | Promise<boolean>; 属性应该是个 |
@wendzhue 嗯。是的,我修改一下。 |
* feat(module:tabs): add and hooks * feat(module:tabs): fix bug with onpush * feat(module:tabs): remove canDeactivate and add test * feat(module:tabs): update demo * feat(module:tabs): modify api name * feat(module:tabs): remove console close NG-ZORRO#4432
* feat(module:tabs): add and hooks * feat(module:tabs): fix bug with onpush * feat(module:tabs): remove canDeactivate and add test * feat(module:tabs): update demo * feat(module:tabs): modify api name * feat(module:tabs): remove console close NG-ZORRO#4432
What problem does this feature solve?
需求:在切换标签之前,需要做一些验证,只有验证通过的情况下,才可以离开当前标签。
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: