I need more information about the context after triggering a change event.
I decided to use data-
attributes (that can only be applied to regular html tags). Since I'm using <ui:inputNumber
, I can't pass them directly. So I decided to wrap it with a div.
<div data-row="{!cell.rowKey}" data-column="{!cell.columnKey}">
<ui:inputNumber change="{!c.cellChanged}" value="{!cell.value}" />
</div>
- I can't use aura:id like suggested here, since I'm in an aura:iteration.
- For a regular DOM event, I could probably use something like
event.target.parentNode
, but it is a lightning event, where there is no parent node. - I really only need it on a data change, so onmousewhatever won't do the trick.
Can I add the cell it self to the event? Or is there any chance to bubble this change event to the div, fire any other event to the div, or any other way to get the parent node in JS?