2 min read
Target Audience |
Developer |
Technology |
Microsoft Teams, SPFx |
Read Time |
10 minutes |
Understand time including reading links |
3 hrs |
© 2024 Peter Ward.
Target Audience |
Developer |
Technology |
Microsoft Teams, SPFx |
Read Time |
10 minutes |
Understand time including reading links |
3 hrs |
In the previous article I showed the reader how to put a custom tab in a Team.
Until now, we see how to implement SPFx team’s tabs with basic functionality let us get into little more into it. What If we wanted to display List Data on Demand in teams? Let us Dive into it.
Before going into the code, you should clean your Solution from Teams.
In this Project, I wanted to use Bootstrap css too for this I am Importing SPComponent Loader Class and refracting Bootstrap files.
Once I am done with that I am using PNP to access the list data, if you want to use REST API you can use it too but I wanted to go with PNP this time.
Run “npm install sp-pnp-js” and import it into our ts file.
Add an event listener click function for the button that was created and get the list data from on the button click event using PNP.js. Once we get the data response to build HTML and display on the page.
Run Following commands and follow the same instructions in part to deploy into Teams.
https://github.com/peterwardsoho/SPFxTeamsPart-II
Final output will be like this.