We are trying to convert an application written using Visualforce to Salesforce Lightning. We have following code in our lightning component. The component displays the values querried from the object properly. But however, when user edits the value in "inputText", the value gets automatically overwritten with the original value.

Need suggestion in resolving this issue. Notice that we are iterating through Wrapper.

    <aura:iteration var="objLIW" items="{!v.lstLIWrapper}" indexVar="productId">
                <td><ui:inputText class="slds-input" value="{!objLIW.lineItem.Quantity__c}" maxlength="3" /></td>
                    <td><ui:outputCurrency value="{!objLIW.lineItem.Price_Each__c}"/></td>
                    <td><ui:outputText value="{!objLIW.product.Name}"/></td>
  • Please post code to make it easy
    – Anurag
    Commented Apr 7, 2017 at 19:28

1 Answer 1


I want you to re-look at your approach of using wrapper object, if it is absolutely necessary go for it, else avoid it if possible. Read SFDCFOx answer comment in the answer section about wrapper classes and Lightning.


Having made the above comment, I have walked down the same path and figured out what was happening. You can fix this issue by simply using updateOn attribute in the ui:inputtext and on change event you can call the JS function (or) use a button to call the JS function

<td><ui:inputText class="slds-input" value="{!objLIW.lineItem.Quantity__c}" maxlength="3" updateOn="change"/></td>

You must log in to answer this question.

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