Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public render(): void {
  2.  
  3. const element: React.ReactElement<IFaqProps > = React.createElement(
  4. Faq,
  5. {
  6. description: this.properties.description,
  7. items : this._getListData()
  8.  
  9. /*[{Question:"question",Reponse:"response", Categorie :{Title : "SharePoint"} , Langue:"fr"},
  10. {Question:"question",Reponse:"response", Categorie :{Title : "OnDrive"} , Langue:"fr"}]*/
  11. //this._getFacItems()
  12.  
  13. }
  14. );
  15.  
  16. ReactDom.render(element, this.domElement);
  17. }
  18.  
  19. public _getListData() :Promise <IExampleItem[]> {
  20.  
  21. return sp.web.lists.getByTitle("FAQ_List").items
  22. .select("Question", "Reponse","Categorie/Title", "Langue")
  23. .expand("Categorie")
  24. .get()
  25. .then((response) => {
  26.  
  27. return response;
  28. });
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement