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 #14525

Closed
jkremlacek opened this issue Jan 10, 2024 · 1 comment
Closed
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jkremlacek
Copy link
Contributor

Describe the bug

When value of attribute pEditableColumnDisabled changes during runtime, an error is thrown due to change.data being undefined.

I believe that error is in:

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

Windows 10, starting Angular app with yarn.

Reproducer

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

Angular version

17.0.8

PrimeNG version

17.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

21.1.0

Browser(s)

No response

Steps to reproduce the behavior

Open example, click enable editing.

Expected behavior

Error is not thrown into console when value of input pEditableColumnDisabled is changed during runtime

@jkremlacek jkremlacek added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 10, 2024
jkremlacek added a commit to jkremlacek/primeng-14525 that referenced this issue Jan 10, 2024
…olumn changes

SimpleChanges might not have `data` defined when only other input than `data` changes.
@mehmetcetin01140 mehmetcetin01140 added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 11, 2024
@mertsincan mertsincan added this to the 17.3.3 milestone Jan 16, 2024
@ps-2512
Copy link

ps-2512 commented May 22, 2024

This is the same issue I am facing on primeNG version 16.9.1 @jkremlacek @mertsincan @mehmetcetin01140

@cetincakiroglu cetincakiroglu added LTS-PORTABLE Issue's fix will be ported to supported LTS versions LTS-16-PORTABLE and removed LTS-PORTABLE Issue's fix will be ported to supported LTS versions labels May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants