The search webpart extends the list webpart, and includes a filterItems method to return items based on the inputed filter text.
import { WebParts } from "gd-sprest-bs";// Create the webpartlet wp = WebParts.WebPart({ elementId: "my-wpSearch", cfgElementId: "my-wpSearch-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 webpartlet wp = WebParts.WebPart({ elementId: "my-wpSearch", cfgElementId: "my-wpSearch-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
Search WebPart
The search webpart extends the list webpart, and includes a filterItems method to return items based on the inputed filter text.