I have a lightning component and I'm using lightning:pill
to show selected ids. Whenever I call the onitemremove
I get this error
[Cannot read property '$$OwnerKey$$' of null]
I've managed to pinpoint that using the splice
function causes the error. I'm also using jQuery 224.
HTML
<lightning:pillContainer aura:id="pillContainer" items="{!v.selectedProductIds}" onitemremove="{!c.removeItem}"/>
Controller.js
removeItem : function(component, event, helper){
helper.removeItem(component, event);
},
Helper.js
removeItem : function(component, event){
var index = event.getParam("index");
var items = component.get('v.selectedProductIds');
items.splice(index, 1);
component.set('v.selectedProductIds', items);
},