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 Issue with OnPush Strategy and <p-editor> #14383

Closed
shahar19966 opened this issue Dec 17, 2023 · 1 comment
Closed

Change Detection Issue with OnPush Strategy and <p-editor> #14383

shahar19966 opened this issue Dec 17, 2023 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@shahar19966
Copy link

Describe the bug

Current behavior
When using the component within a component that has the ChangeDetectionStrategy.OnPush strategy, changes made in the editor are not being detected by Angular's change detection mechanism. This results in the view not updating in response to data changes unless markForCheck() or detectChanges() is explicitly called.

Expected behavior
Changes made in the component should be detected by Angular's change detection system, even when the parent component uses the OnPush change detection strategy. The view should update automatically to reflect the new state.

Minimal reproduction of the problem with instructions

Create an Angular component with ChangeDetectionStrategy.OnPush.
Add a component bound to a form control within this component.
Make changes in the editor and observe that the view does not update.
What is the motivation / use case for changing the behavior?
Ensuring compatibility with Angular's OnPush change detection strategy is crucial for performance optimization, especially in large applications where this strategy is commonly used.

Environment

Angular version:16.2.11
PrimeNG version: 16.3.1

Reproducer

No response

Angular version

16.2.11

PrimeNG version

16.3.1

Build / Runtime

TypeScript

Language

ES6

Node version (for AoT issues node --version)

18.18.2

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@shahar19966 shahar19966 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 17, 2023
@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap?
Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants