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

Busy Indicator in Component dialog not closing after value change #12471

Open
Ashah2013 opened this issue Sep 26, 2024 · 6 comments · May be fixed by #12521
Open

Busy Indicator in Component dialog not closing after value change #12471

Ashah2013 opened this issue Sep 26, 2024 · 6 comments · May be fixed by #12521
Assignees

Comments

@Ashah2013
Copy link

Ashah2013 commented Sep 26, 2024

Is this a bug, enhancement, or feature request?

Bug

Describe your proposal.

In component based dialog, any data change after initial load is not reflected until a click event or button press event is triggered.

Can you handle that on the application side

No

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

Angular version - 18.0.3
Fundamental NGX version - 0.52.0

If this is a bug, please provide steps for reproducing it; the exact components you are using;

Open a component based dialog.
Change any value of a variable or set busyindicator to false after sometime or after completion of any API call.
The changes are not reflected until you click or press any button.

Please provide relevant source code if applicable.

https://stackblitz.com/edit/angular-mylhjb-xdxs7j?file=src%2Fapp%2Fapp.module.ts,src%2Fapp%2Fdialog-example.component.ts

Did you check the documentation and the API?

Yes

Did you search for similar issues?

Yes, #9682

IMPORTANT: Please refrain from providing links or screenshots of SAP's internal information, as this project is open-source, and its contents are accessible to anyone.

@droshev
Copy link
Contributor

droshev commented Sep 26, 2024

@khotcholava Can you check this ticket quickly? Thanks.

@khotcholava
Copy link
Contributor

@Ashah2013 Can you please check this stackblitz link? Here is the solution for you.

@Ashah2013
Copy link
Author

Do we need to use changeDetectorRef.detectChanges() all the time?? This issue happened in all dialogs only after the fundamental ngx upgrade. We have many dialogs and every dialog has some API calls.. if we follow this approach, we would need to do detectChanges at many places.
Has something changed recently in dialog component which caused this?

@khotcholava
Copy link
Contributor

@Ashah2013 This is a temporary solution if you need it. Of course I need to dig deeper to find the actual solution.

@droshev
Copy link
Contributor

droshev commented Sep 30, 2024

@khotcholava do you think you can find the root cause why the dialog changed?

@khotcholava
Copy link
Contributor

@Ashah2013 The issue was introduced in Angular 18. Previously, it worked due to a bug in Angular's change detection mechanism. However, with the update, the core of change detection was modified to function as originally intended. To use it correctly now, you need to implement the "OnPush" change detection strategy or utilize signals.

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

Successfully merging a pull request may close this issue.

4 participants