I am having a lightning web component which iterates over a list and displays values in a list
HTML:
<template>
<template for:each={myList} for:item="myRecord">
<div class="slds-truncate" title={rowSip.rowSIP.E2E_Volume_Target_FFE__c}>
<lightning-input type="text" name="input2" value={myRecord.Name} onchange={updateValues}></lightning-input>
</div>
</template>
Javascript:
updateValues(event) {
console.log(this.myList);
}
Problem:
In the 'updateValues' , I am consoling the list. But it has the old value.
Expected:
The list should give the modified value.
What could be the problem ? Or how to get the updated list values in Javascript ?