Selecting row doesn't work with inplace
I'm submitting a ... (check one with "x")
[ x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) https://stackblitz.com/edit/github-tnjgvt
Current behavior
- Add inplace edit to table with selectable rows.
- Click edit.
- An error pops up in the console:
ERROR TypeError: Cannot read property 'nodeName' of null at Table.handleRowClick (table.ts:761) at SelectableRow.onClick (table.ts:2608) at Object.eval [as handleEvent] (AppComponent.html:10) at handleEvent (view.ts:138) at callWithDebugContext (services.ts:629) at Object.debugHandleEvent [as handleEvent] (services.ts:376) at dispatchEvent (util.ts:134) at eval (element.ts:200) at HTMLTableRowElement.eval (dom_renderer.ts:52) at ZoneDelegate.invokeTask (zone.js:423)
Expected behavior no error
Minimal reproduction of the problem with instructions as above
- Angular version: 7.2.6
- PrimeNG version: 7.0.5
- Browser: all
- Language: TS
I am getting the same error with pEditableColumn inside a turbo table.
I'm getting the same thing when putting custom angular component inside a tr/td
<td>
<sn-player-game-history-button [playerId]="rowData.id"></sn-player-game-history-button>
</td>
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.
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
I made a PR for https://github.com/primefaces/primeng/issues/7363, that might also fix this issue with inplace.