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

EditableColumn: error in ngOnChanges when input other than data changes #15657

Closed
ps-2512 opened this issue May 22, 2024 · 1 comment
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ps-2512
Copy link

ps-2512 commented May 22, 2024

Describe the bug

In Reference to this issue #14525 which was fixed for 17 version. I am facing same issue on version 16 now

When value of any input attribute such as pEditableColumnDisabled changes during runtime, an error is thrown due to change.data being undefined.
I believe that error is in:

primeng/src/app/components/table/table.ts
Line 4067 in 8c9f3d0
if (this.el.nativeElement && !data.firstChange) {

Which assumes that property data of SimpleChanges object will be always defined, which is not true when only the pEditableColumnDisabled input changes (f.e. with slight delay).

Environment

unrelated

Reproducer

https://stackblitz.com/edit/github-8qgwug-rbxqag?file=src%2Fapp%2Fapp.component.html

Angular version

16.2.12

PrimeNG version

16.9.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.10.0

Browser(s)

No response

Steps to reproduce the behavior

Open example, click enable editing.

Expected behavior

No error should be thrown on console when any input attribute changes on editable column

@ps-2512 ps-2512 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 22, 2024
ps-2512 added a commit to ps-2512/primeng that referenced this issue May 22, 2024
@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 open a new issue so we can include it in our roadmap?

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