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

TypeError: Cannot read property 'nodeName' of null at Table.handleRowClick #7363

Closed
aspramsh opened this issue Mar 11, 2019 · 4 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@aspramsh
Copy link

I get the following error when I click enter on p-table editable column cellEditor: TypeError: Cannot read property 'nodeName' of null at Table.handleRowClick. Could someone explainwhy? When I put the input inside html form, the error disappears.

@cagataycivici
Copy link
Member

Provide a stackblitz template please.

@zbogdanov
Copy link

zbogdanov commented Mar 14, 2019

I'm getting the same thing when putting custom angular component inside a tr for turbo table.

 <td>
    <sn-player-game-history-button [playerId]="rowData.id"></sn-player-game-history-button>
 </td>

The code behind sn-player-game-history-button is:

<button [disabled]="buttonDisabled" *ngIf="state === ViewState.None" pButton type="button" icon="fas fa-address-book"
  [label]="lookupStateLabel" (click)="loadHistory()"></button>
<div *ngIf="state === ViewState.Loading" style="padding: 4px 8px">
  <i class="fas fa-spinner fa-spin"></i>
</div>
<button [disabled]="buttonDisabled" *ngIf="state === ViewState.Loaded" pButton type="button" icon="fas fa-address-card"
  [label]="loadedStateLabel" (click)="showHistory()"></button>
<sn-player-game-history-dialog #gameHistoryDialog></sn-player-game-history-dialog>

This is a mayor problem for us an we are yet to find a workaround. Problem seems to be in https://github.com/primefaces/primeng/blob/master/src/app/components/table/table.ts#L772 but I can't be sure.

@Rillist
Copy link

Rillist commented Mar 25, 2019

I have the same issue with pEditableColumn as well, here is a stackblitz example. Note that the error is intermittent, and occurs when the row selection fails.

https://stackblitz.com/edit/nodenameofnull

@Rillist
Copy link

Rillist commented Mar 25, 2019

Seems like a simple check for null/undefined fixes the issue, I made a PR if someone wants to take a look.
#7443

Sorry if I am not following correct process, I didn't see any contribution guides but honestly I didn't look very hard either.

@cagataycivici cagataycivici self-assigned this Apr 17, 2019
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Apr 17, 2019
@cagataycivici cagataycivici added this to the 7.1.1 milestone Apr 17, 2019
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

4 participants