You need to sign in to do that
Don't have an account?
imrohit
i want to multiply price and quantity and store that value in totalamount field for each row.
please suggest the solution
Thanks in advance
can i perfom calculations on the client side in lightning component using jQuery and assign that value to the value attribute of ui:outputText so that i can save this value to my database on click of save button
<aura:iteration items="{!obj.productRenewList}" var="iobj"> <tr class="slds_line_height-small g" > <td><ui:inputCheckbox value="{!iobj.isSelected}"/></td> <td> <ui:outputText value="{!iobj.prd.Name}" /> </td> <td> <ui:outputText class="a" value="{!iobj.prd.Price__c}" /> </td> <td><lightning:input class="b" type="Number" value="{!iobj.prd.Quantity__c}" /></td> <td><ui:outputText class="c" value="{!iobj.prd.Total_Amount__c }" /> </td> </tr> </aura:iteration>
i want to multiply price and quantity and store that value in totalamount field for each row.
please suggest the solution
Thanks in advance
You don't need an extra framework in javascript for this basic recalculation.
Just use onchange