primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Selecting row doesn't work with inplace

Open krojew opened this issue 7 years ago • 4 comments

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

  1. Add inplace edit to table with selectable rows.
  2. Click edit.
  3. 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

krojew avatar Mar 05 '19 10:03 krojew

I am getting the same error with pEditableColumn inside a turbo table.

aspramsh avatar Mar 07 '19 15:03 aspramsh

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.

zbogdanov avatar Mar 14 '19 11:03 zbogdanov

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 avatar Mar 25 '19 18:03 Rillist

I made a PR for https://github.com/primefaces/primeng/issues/7363, that might also fix this issue with inplace.

Rillist avatar Mar 25 '19 19:03 Rillist