nameList =[];
firstValue='';
getListofString().then(data => {
this.nameList = data;
this.firstValue=?
})
1 Antwort
HI Kishore,Does using this.firstValue=data[0] work for your scenario?The below articles might help:https://salesforce.stackexchange.com/questions/271003/accessing-single-element-of-list-from-apex-in-lwchttps://salesforce.stackexchange.com/questions/264631/lwc-how-to-handle-null-situation-before-the-data-is-loaded-from-controller?rq=1Thanks