0

I have the below markup in my Lightning component.

<aura:attribute name="items" type="InventoryAdjustWrapper[]" description="Items" access="public" />
<!-- <aura:attribute name="items" type="List" description="Scanned Items" access="public" /> -->


<aura:iteration items="{!v.items}" var="item" >
<ui:inputText class="slds-input" value="{!item.Trans.MyApp__Quantity__c}"  />
</aura:iteration>

It does not seem to be accepting values. v.items is a List of wrappers from below.

public with sharing class InventoryAdjustWrapper {

    @AuraEnabled
    public MyApp__Inventory__c Inv{get;set;}

    @AuraEnabled
    public Tra__c Trans{get;set;}
}

Console.log(v.items[0]) returns:

Object { Inv: Getter, Trans: Getter }

Any clue as to why?

  • Can you post your helper code? – Anurag May 3 '17 at 1:48
  • 1
    What do you mean by "Not Accepting" are you getting an error, nothing displayed, etc. – Eric May 3 '17 at 2:03
  • Thanks @Eric when I enter a value into MyApp__Quantity__c and press tab or click somewhere it's reset back to initial value. It doesn't have any event to do that. But if I use a different field name for Value, e.g. value="{!item.Trans.MyApp__Quantity__c}" >> value="{!item.Trans.Name}" it works fine. I find it strange for this particular field. I checked if the field is a formula, but it's not. it's a numeric field. I tried with inputText too. but same issue. – Pasan Eeriyagama May 3 '17 at 2:32
  • Suggest you update your title and question to reflect what your question / issue actually is – Eric May 3 '17 at 4:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.