fix(ui5-table): rowClick is fired for popped in cells as well #1671
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were 2 separate bugs:
TableRow.hbs
the event handler for popped in rows was bound inside a loop ({{#each popinCells}}
) however without../
so it was never executed.../
the event was firing only when the user specifically clicks on the table cell, not on the whole row. The reason is that_cellclick
is fired fromui5-table-cell
only and inside popped in rows much of the content is just regular<td>
s which don't fire any events. It is not necessary for the table cell to proxy clicks to the table row and the row to proxy clicks to the table. It is enough to just bind@click
handlers to the normal<tr>
and the popped in<tr>
insideTableRow.hbs
. In addition, it is not necessary to fire the publickrowClick
event fromui5-table
. It's better to fire it fromui5-table-row
and it will propagate to the table anyway. I don't mind leaving the event's documentation on table level, although technically it's not fired by the table itself.closes: #1670