Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public render(): void {
- const element: React.ReactElement<IFaqProps > = React.createElement(
- Faq,
- {
- description: this.properties.description,
- items : this._getListData()
- /*[{Question:"question",Reponse:"response", Categorie :{Title : "SharePoint"} , Langue:"fr"},
- {Question:"question",Reponse:"response", Categorie :{Title : "OnDrive"} , Langue:"fr"}]*/
- //this._getFacItems()
- }
- );
- ReactDom.render(element, this.domElement);
- }
- public _getListData() :Promise <IExampleItem[]> {
- return sp.web.lists.getByTitle("FAQ_List").items
- .select("Question", "Reponse","Categorie/Title", "Langue")
- .expand("Categorie")
- .get()
- .then((response) => {
- return response;
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement