I have a hierarchy of components as shown below:
c:DataGridContainer
|__ c:DataGrid
|__ c:DataTable
I have defined a component event(DGGetGridDataEvent) as shown below:
<aura:event type="COMPONENT" description="Indicates request to change the page of the data table." access="public">
<aura:attribute name="pageNumber" type="Integer" />
<aura:attribute name="pageSize" type="Integer"/>
<aura:attribute name="columnLabel" type="String" />
<aura:attribute name="columnName" type="String" />
<aura:attribute name="sortDirection" type="String" />
The c:DGTable component registers the event as shown below:
<aura:registerEvent name="getGridDataEvent" type="c:DGGetGridDataEvent"/>
and fires the event as shown below:
var getGridDataEvent = component.getEvent("getGridDataEvent");
getGridDataEvent.setParams({
'pageNumber' : pageNumber,
'pageSize' : pageSize,
'columnName':'',
'sortDirection':'',
'actionType': 'Pagination'
});
getGridDataEvent.fire();
The c:DataGridContainer has a handler defined as shown below:
<aura:handler name="dgGetGridDataEvent" event="c:DGGetGridDataEvent" action="{!c.handleDataFetchEvent}" phase="capture"/>
and the handler definition is as shown below:
handleDataFetchEvent : function(component, event, helper){}
However, when the event is fired the handler is not invoked. What's wrong with the code i have written?
stopPropagation()
calls stopping the event?