+ Start a Discussion
VidulaVidula 

Lightning Component Error

Hello All,

We have implemented functionality to accept user input. In this we have single select questions for which we are using radio input.
Following is the code : 
<aura:renderIf isTrue='{!question.answer == opt}'>
<input type="radio" value="{!question.id}" name="{!questionNumber}" onchange="{!c.onRadioSelect}"  title="{!opt}" checked='checked'/>{!opt}
<aura:set attribute='else'>
<input type="radio" value="{!question.id}" name="{!questionNumber}" onchange="{!c.onRadioSelect}"  title="{!opt}"/>{!opt}
</aura:set>
</aura:renderIf>


Here, question.answer = selected answer ( Saved in object )
{!opt} = label of input radio 

When we are trying to load lightning component for existing result, it is throwing following error.
Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Invalid component tried calling function [get] with arguments [v.items.0]



User-added image

We have also tried to use <ui:inputRadio label="Yes"/> , but design is not working for this properly, also it won't render on iPhone properly.

If anyone has faced similar issue or has any idea , please let me know.
Thanks ,
James LoghryJames Loghry
Simply put, you're calling a function with invalid arguments.  I would start by commenting out pieces of your component until the component successful, then working down from there to resolve the issue.
Fabien TaillonFabien Taillon
Can you give us more code so that we could have a deeper look to your issue ?
VidulaVidula

@James Loghry : When we removed  checked='checked'  attribute of input, it won't give any error. But I want to show selected value so need to use this attribute.

@Fabien Tailon :
Unfortunately I can share below small piece of code only.
    onRadioSelect: function(component, event, helper) {
        var radioValue = $(event.target).attr("title");
        var questionId = $(event.target).attr("value");
        //-- saving this value in an array       
    }