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.


<lightning:pillContainer aura:id="pillContainer" items="{!v.selectedProductIds}" onitemremove="{!c.removeItem}"/>


removeItem : function(component, event, helper){
    helper.removeItem(component, event);


removeItem : function(component, event){
    var index = event.getParam("index");
    var items = component.get('v.selectedProductIds');

    items.splice(index, 1);
    component.set('v.selectedProductIds', items);   


1 Answer 1


There's a known issue in the Winter '19 release that hasn't been resolved yet. It's related to inputfields though. I wouldn't have thought of pillcontainer as in input! Seems like a very specific error message though. Take a look:

Lightning input fields throw error: Cannot read property '$$OwnerKey$$' of null

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .