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

Table: 'this.el.nativeElement.parentElement is null' for frozen columns which are dynamically generated #12748

Closed
Kisters-BS opened this issue Mar 14, 2023 · 2 comments · Fixed by #12752
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Kisters-BS
Copy link
Contributor

Describe the bug

I generate my table columns with frozen columns dynamically and newly assign them on every update.
When I update the table columns I get the error:

The error is from the updateStickyPosition function where the parentElement is undefined:
let filterRow = this.el.nativeElement.parentElement.nextElementSibling;

Environment

See stackblitz

Reproducer

https://stackblitz.com/edit/github-w2zrds

Angular version

15.2.2

PrimeNG version

15.2.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.19.0

Browser(s)

All

Steps to reproduce the behavior

  1. Click on the update button
  2. See error message in the console

Expected behavior

No error thrown

@Kisters-BS Kisters-BS added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 14, 2023
@Kisters-BS Kisters-BS changed the title Table: 'this.el.nativeElement.parentElement is null' for frozen columns which are dynamic generated Table: 'this.el.nativeElement.parentElement is null' for frozen columns which are dynamically generated Mar 14, 2023
volvachev added a commit to volvachev/primeng that referenced this issue Mar 15, 2023
volvachev added a commit to volvachev/primeng that referenced this issue Mar 22, 2023
@cetincakiroglu cetincakiroglu added this to the 15.4.2 milestone Apr 25, 2023
@cetincakiroglu cetincakiroglu 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 Apr 25, 2023
@Kisters-BS
Copy link
Contributor Author

Thank you 🙏

@digeomel
Copy link

I am sorry, this bug was identified on version 15 but the bugfix was merged only on version 16. Can we please have it merged on version 15, too? We cannot upgrade to 16 just yet.

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

Successfully merging a pull request may close this issue.

3 participants