Skip to content

fix(ui5-table): rowClick is fired for popped in cells as well #1671

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

Merged
merged 1 commit into from
May 21, 2020

Conversation

vladitasev
Copy link
Contributor

There were 2 separate bugs:

  • In TableRow.hbs the event handler for popped in rows was bound inside a loop ({{#each popinCells}}) however without ../ so it was never executed.
  • Even after adding ../ 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 from ui5-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> inside TableRow.hbs. In addition, it is not necessary to fire the publick rowClick event from ui5-table. It's better to fire it from ui5-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

Copy link
Member

@ilhan007 ilhan007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean up

@vladitasev vladitasev merged commit c48f541 into master May 21, 2020
@vladitasev vladitasev deleted the fix-row-click-event branch May 21, 2020 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui5-table: rowClick does not fire for popped in rows
2 participants