-
Notifications
You must be signed in to change notification settings - Fork 0
Step 11
Gunjan Datta edited this page Jun 16, 2021
·
11 revisions
SPFx solution will require the page context to be set. Since we will reference the classic solution, we will need to set the page context in the library.
We will reference the classic solution's library.
// Reference the solution
import "../../../../dist/demoListWP.min.js";
declare var WPList;
- Load Data - Load the list data.
- Set Page Context - In order for the $REST library to execute successfully, the page context will need to be set.
- Render the Table - After loading the data, render the table.
public render(): void {
// Load the data
WPList.load(this.context.pageContext).then(items => {
// Render the table
WPList.renderTable(this.domElement, items);
});
}