The list fields webpart should be used when targeting a list and fields as a datasource.
import { WebParts } from "gd-sprest-bs"; // Create the webpart WebParts.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'); } });
List Fields WebPart Edit Form
Generated using TypeDoc
List Fields WebPart
The list fields webpart should be used when targeting a list and fields as a datasource.
import { WebParts } from "gd-sprest-bs"; // Create the webpart WebParts.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'); } });