The list webpart should be used when targeting a list as a datasource.
import { WebParts } from "gd-sprest-bs";// Create the webpartWebParts.WebPart({ elementId: "my-wpList", cfgElementId: "my-wpList-cfg", onRenderItems: (wpInfo, items) => { // Render the display element wpInfo.el.innerHTML = [ '<h1>List: ' + wpInfo.ListName + '</h1>', '<h5>List Items: ' + items.length + '</h5>' ].join('\n'); }}); Copy
import { WebParts } from "gd-sprest-bs";// Create the webpartWebParts.WebPart({ elementId: "my-wpList", cfgElementId: "my-wpList-cfg", onRenderItems: (wpInfo, items) => { // Render the display element wpInfo.el.innerHTML = [ '<h1>List: ' + wpInfo.ListName + '</h1>', '<h5>List Items: ' + items.length + '</h5>' ].join('\n'); }});
Generated using TypeDoc
List WebPart
The list webpart should be used when targeting a list as a datasource.