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
Is there a simple way to disable ok button in a modal #3743
Comments
I read the soure code nz-modal.service.ts. The method 'getInstance' of NzModalRef can feat my requirement. But it is not mentioned in the official doc.
Is this api safe/stable to use? |
The getInstance api does not seem stable to use as it it now removed in the beta 😕 Alternatives might be |
cc @hsuanxyz |
@krokofant |
…5332) * fix(module:modal): some cases there is no changes detected close NG-ZORRO#5328, close NG-ZORRO#5287, close NG-ZORRO#5259 * docs(module:modal): update the API docs close NG-ZORRO#3743
but,it is invalid |
What problem does this feature solve?
disable a ok button is quite common, but it is too exhausted to use nzFooter.
What does the proposed API look like?
currently, if I want to disable a ok button when a formGroup is invalid, the code will be like below.
but if ModalOptionsForService.nzOkDisabled can accept a function takes contentComponentInstance as arg, the 'perform' method above can be simplify.
The text was updated successfully, but these errors were encountered: