Skip to content
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

Change detection in drawer stops to work when returning from modal #8630

Öffnen Sie
lasas opened this issue Jul 9, 2024 · 1 comment
Öffnen Sie

Change detection in drawer stops to work when returning from modal #8630

lasas opened this issue Jul 9, 2024 · 1 comment
Assignees

Kommentare

@lasas
Copy link

lasas commented Jul 9, 2024

Reproduction link

https://stackblitz.com/edit/stackblitz-starters-r33rar?file=src%2Fmain.ts

Steps to reproduce

  1. Open drawer
  2. Open modal (button in drawer will be in loading state)
  3. Close modal

What is expected?

After closing modal, button in drawer should be in normal state (not loading).

What is actually happening?

After closing modal, button in drawer is still in loading state.

Environment Info
ng-zorro-antd 18.0.1
Browser Firefox, Google Chrome

It's regression after upgrade to v18. Not sure if it's CDK or ng-zorro-antd.

It's possible to workaround it using ChangeDetectorRef.markForCheck()

@lasas
Copy link
Author

lasas commented Sep 18, 2024

My guess, that this is result of Angular changes in v18: angular/angular@64f870c

But I'm still not sure, that's the best way to solve it. It's possible to use markForCheck() after closing modal (like commented line in sample). But maybe the better way to migrate to signals? Locally, I converted modalOpened to signal and no more issue. Is the signals are the way to go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants