Created
January 3, 2019 08:48
-
-
Save ypcode/e684899943a91b28ddfa6cd42fae3a2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
import CustomPanel, { ICustomPanelProps } from "./components/CustomPanel"; | |
import { sp } from "@pnp/sp"; | |
import { autobind, assign } from '@uifabric/utilities'; | |
// ... | |
const LOG_SOURCE: string = 'CustomFormPanelCommandSet'; | |
export default class CustomFormPanelCommandSet extends BaseListViewCommandSet<ICustomFormPanelCommandSetProperties> { | |
private panelPlaceHolder: HTMLDivElement = null; | |
@override | |
public onInit(): Promise<void> { | |
Log.info(LOG_SOURCE, 'Initialized CommandSetWithPanelCommandSet'); | |
// Setup the PnP JS with SPFx context | |
sp.setup({ | |
spfxContext: this.context | |
}); | |
// Create the container for our React component | |
this.panelPlaceHolder = document.body.appendChild(document.createElement("div")); | |
return Promise.resolve(); | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment