actually Im working with SPFX webpart using React, really don
t understand what is the issue here, but when I debug it shows the blow screenshot.
trying to get the SP list items in SPFX webpart using React, during the map it getting error. please assist me using the below piece of code.
[]
public render(): React.ReactElement<IGetSpListItemsProps> {
return(
<div className={"styles.welcome"}>
<table >
{
this.state.listitems.map(function (listitem, listitemkey){
let fullurl: string = `${GetSpListItems.siteurl}/lists/SampleList/DispForm.aspx?ID=${listitem.ID}`;
return(
<tr>
<td><a className={styles.label} href={fullurl}>{listitem.Title}</a></td>
<td className={styles.label}> {listitem.ID}</td>
</tr>)})}
</table>
Here is the video where I have gone through as per the same I have followed but when I try it shows undefined error text
Via Active questions tagged javascript - Stack Overflow https://ift.tt/JuLYq7p
Comments
Post a Comment