Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [spfx-webparts]

Technical questions about building and using web parts based on the SharePoint Framework client-side development model.

24
votes
4answers
3k views

Will the new SharePoint FrameWork increase speed?

I don't have a benchmark but it seems to me SharePoint Online is getting slower. This is a fresh new SPOnline Tenant, (News) images being pulled from a Picture Library Is it me or is this just super ...
20
votes
4answers
4k views

SPFx: loading jQuery (and other libraries)

The SharePoint Framework weather example loads jQuery inside the WebPart render method: https://www.youtube.com/watch?v=HGC9gsDRy1E#t=10m30 Questions: Is this the preferred development pattern? ...
11
votes
2answers
2k views

Access the query string from SPFx web part using React

I'm rebuilding a SP 2013-era EditForm.aspx web part using SPFx & React. I would appreciate advice on how to get the query string into a SPFx web part. I don't see any methods in the SharePoint ...
9
votes
1answer
2k views

Options for elevating permissions in SharePoint Framework

Background I have a site which will have a number of Lists and a Document Library deployed as part of an SPFx application. The Document Library will have a folder hierarchy which must be strictly ...
9
votes
1answer
260 views

Implement licensing in SpFx?

I have created 4 web parts using SPFX. Now I want implement licensing. If the user has purchase license then can access web part else user is redirected to license. What is the best approach to ...
8
votes
2answers
989 views

Using MS Graph from SharePoint Framework 1.5.1 / 1.6

Can someone, please help me with figuring out how to use MSGraphClient from the latest SPFx version? MSGraphClient is supposed to help us to use MS Graph. My problem is that as soon as I add the line ...
8
votes
3answers
1k views

Run development and production versions of the SP Fx web parts in two different site collections?

Currently, the SharePoint Framework solutions are deployed as tenant wide app packages. Thereby, all instances of the web parts refer the JavaScript files from the CDN location specified in the ...
8
votes
1answer
648 views

Apps added to App Catalog not available for installation on other sites

I started with SPFx development recently. I packaged a client side web-part as a file helloworld-webpart.sppkg following Microsoft's tutorial. Then I uploaded it to my Apps Catalog site. Though it was ...
8
votes
1answer
267 views

How do I retrieve the SharePoint Modern site's classification property via search REST APIs?

I am creating a rollup of Modern team and communication sites that are provisioned in my tenant by creating one SPFx webpart which retrieves the site's title, URL, logo and some other properties using ...
7
votes
1answer
5k views

SPFx gulp package-solution fails

Running all @microsoft/sp-* packages @1.3.4 When I run gulp package-solution --ship, I get the following error message: Error - Error: The webparts manifests list is empty. Please ensure you have ...
7
votes
2answers
4k views

SPFx - How to call function on button click event from ts file with React

How to call function from ".ts" file for button onClick event in tsx file? this is my function in ts file: public button_click(): void { alert("CLICKED!"); }
7
votes
2answers
2k views

SPFx - Cannot find type definition file for 'es6-collections'

I am trying to create a solution which will deploy the assets to SP online by following tutorial. Since this is based on version 1.4.0 i have udpated @microsoft-* packages to 1.4.0 But I am getting ...
7
votes
1answer
226 views

SharePoint framework

https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview In this new Client Web Part model there would be no IFrames. It will be all cient side thing. My question is, where would ...
6
votes
4answers
3k views

'gulp serve' command opens SharePoint Framework workbench in a blank screen

I'm trying to build a simple client-side web part using new SharePoint Framework with the help of OfficeDev Site. I've installed all the required components mentioned in OfficeDev After the ...
6
votes
5answers
2k views

SPFx: Is TypeScript compulsary for future SharePoint development?

Been looking into ways to keep a development team with medior JavaScript skills into the loop. Basically I just want a SPFx Content Editor WebPart where they can do anything they have done with ...
6
votes
1answer
622 views

Calling external APIs securely from SharePoint Framework

I checked out the webcast 'Calling external APIs securely from SharePoint Framework'. Can that be used to call on-prem web-api without using azure? If I wanted to host a web-api on premise and call ...
6
votes
1answer
193 views

Where can I find the TypeScript source code of the SharePoint Framework?

Where can I find the TypeScript source code of the SharePoint Framework? With Microsoft being more open and generally providing everything as open source nowadays I expected to find it pretty quickly....
6
votes
2answers
1k views

Can SPFx Webpart and Extension exist in a single app?

I'm starting to get my hands on using the new SharePoint Framework. I have general ideas about how they work now but I couldn't any document or statement that they (Client Web Part and Extension) ...
6
votes
1answer
2k views

SPFx Replacement for Script Editor Web Part

So I was having a play around with the new Modern Experience site pages and while it's pretty slick and looks great (as well as fixing the issues with container layouts being a royal pain to change ...
6
votes
1answer
498 views

SPFx webpart not updating with latest spkg uploaded

My Spfx spkg uploads successfully to the apps catalog. Tenant wide upload is enabled. When I do 'Add an App', This app is not available for installation under 'From your Organisation' Although when ...
6
votes
2answers
998 views

Adding Spfx Web Parts to Modern site Pages using PNP CSOM in Azure AD Apps

I had Create a web application with Azure AD authentication using Azure AD Application. I had granted all permission for SharePoint Online,Graph Api and Active Directory to the App for provisioning ...
6
votes
1answer
577 views

Update list in SharePoint framework - SPFx app

i have created list and columns in SPFx app using elemets.xml and schema.xml. Now after doing this i want to add new column to already created list. I have created elements-v2.xml and upgrade-actions-...
5
votes
3answers
8k views

How to retrieve pageContext in SPFx?

I'm following the second tutorial from the SharePoint Framework dev center: Connect to SharePoint It states that you can retrieve details from this.context.pageContext, however this is no longer the ...
5
votes
2answers
3k views

SharePoint Framework – Loading Font Awesome CSS from CDN

I am fairly new to the SharePoint Framework development stack (TS, React, node, etc.) and am looking to incorporate the font-awesome suite into my web-part via a CDN. Normally I would reference this ...
5
votes
2answers
365 views

Create modern team site in SPFx

I found some articles which are explaining creating modern sites with CSOM. But I am not able to find in JavaScript to use in SPFx. Creating modern sites is supported with SPFx? Any PnP extension ...
5
votes
3answers
4k views

SharePoint Framework web parts - dynamic properties pane

I was playing around with the SharePoint framework and I was trying to get the web part to load SharePoint lists via a promise. First I noticed that await and async are not supported (probably due to ...
5
votes
1answer
2k views

How to save a SPFx client side web part to a template inside team site?

I would like to know how can I deploy a SPFx client-side web part I have created as a template to use on all page inside team site.
5
votes
1answer
148 views

Does Virus affected Node Modules transfer in Contents of SPFx deployment package

When we scaffold an SPFx webpart/Extension we get many Node Modules as part of dependencies. These can be seen in node_modules folder and there are also entries in package-lock.json file. I know ...
5
votes
1answer
4k views

workbench page shows “This site can’t provide a secure connection” on creating SPFx Webpart

I am new to SPFx, tried to create simple webpart using SPFx. Referred from here. Followed these steps: -Installed nodejs -Installed gulp & yomen using npm install -g yo gulp in powershell. -...
5
votes
1answer
470 views

cant find module 'react-bootstrap'

I installed necessray packages npm i react-bootstrap-validation", "npm install react-bootstrap and updated typings npm update typings but still getting this error; How can I tell tyscript I ...
5
votes
3answers
561 views

Angular and spfx learning guide

I am getting started with spfx and i have no prior knowledge of angularjs/angular. Recently i saw a blog post that says to use angular element to develop webpart. Can you guys please guide me on ...
5
votes
3answers
6k views

SPX and Typescript - how to add references to SP.JS?

I am trying to start learning the typescript and sharepoint framework. What I have been having trouble with is how to add references to SharePoint js files such as sp.js? For example, what I am trying ...
5
votes
2answers
2k views

How to get Termset using the new SharePoint framework SPFx

I am new to to Typescript, watched videos and created the sample application of client webpart using new SharePoint development framework. All sample application worked well, and using Rest Queries i ...
5
votes
2answers
2k views

SharePoint Framework: How/where to save web part property pane values?

When building a SharePoint Framework web part - where are the property values of the property pane to be saved? With add-ins and their tool pane, the options are: let SharePoint do it, use a hidden ...
5
votes
2answers
414 views

Is Callouts available in SharePoint Framework

I have a classic SharePoint Add-in and I am trying to convert it into SharePoint framework Webpart. I am getting the following error Cannot read property 'getFromLaunchPointIfExists' of undefined ...
5
votes
1answer
2k views

SharePoint Framework: Client Webpart throwing error when testing through workbench

I am trying to develop my first SPFX client webpart. I followed the steps from https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part yo @microsoft/sharepoint ...
5
votes
3answers
2k views

Create List using SPFX

I am trying to create custom list using SharePoint Framework. I created a folder with name Assets under SharePoint folder and created a element.xml in the Assets and updated the package-solution.json ...
5
votes
1answer
446 views

SPFx: inform users when Search last indexed and when Items will appear in results

Scenario: Large team processes a high volume of customer data (multiple Libraries, Document Sets and Sites/ Sites Collections) Part of it is trading information so accurate info is vital. I have an ...
5
votes
1answer
130 views

SPFx: Can we safely use eval or is it evil in SPFX?

I have used JavaScript since it was called LiveScript, and know to value persons who say "Eval is Evil" (Classic SharePoint uses eval() at least 5 times in its core code) So when a new kid on the ...
5
votes
1answer
455 views

SPFx Webpart with AngularJS and Kendo UI defined as external

I'm developing an SPFx webpart with AngularJS and Kendo UI. Kendo UI requires jQuery before AngularJS. As I want to develop multiple webparts with AngularJS and Kendo UI I decided to reference ...
5
votes
2answers
450 views

How to store client web part properties with per user personalized scope using SPFX?

I am creating a webpart using SPFX. I want to store properties set by a different user. For EX: I am going to create weather webpart. So, User1 has set Paris and User2 has set London. When user1 ...
5
votes
1answer
1k views

Spfx - Bootstrap-Dialog

I have been struggling with getting bootstrap-dialog to work in an spfx client web part. So far I was able to get jquery, bootstrap, datatables working but can't seem to get bootstrap-dialog working. ...
5
votes
1answer
117 views

Configure multiple modern SPFx Web Parts on classic pages

We have an issue with Sharepoint Web Parts which have worked perfectly fine in the past, but seem to have broken sometime within the past month without change on our side. One modern web part on the ...
5
votes
2answers
1k views

Include JavaScript file so it load automatically in SharePoint Framework

I am beginner and trying to include JS file in my SharePoint Framework Webpart. I learned how to call different functions of the JS file. I know you can include the file using const myScript = ...
5
votes
1answer
550 views

SPFx web part not showing from the catalog

Followed the video from SharePoint Framework development with SharePoint 2016 Feature Pack 2 but could not add the web part to the site because it did not show up. I made sure I have only SPFx 1.0....
5
votes
0answers
173 views

New Communication site Template supports Multilingual Content

we have a requirement to use new Communication Site template and build a web site, but it should be multilingual. Since new Communication site look and feel and responsiveness suit to my client ...
5
votes
0answers
183 views

Office ui fabric react not working with SharePoint hosted app!

I have created SharePoint hosted app using VS2015, and in that i have used Office ui fabric react components. I have installed it and other packages of React and React-dom using npm, App is ...
4
votes
2answers
2k views

SharePoint Framework: How to detect if running on modern or classic page?

We see some differences in our SPFx web part behavior depending on which page type it is placed on (modern vs. classic). Classic pages behave somewhat differently. I'd like to detect which page type ...
4
votes
2answers
733 views

How does Workbench.aspx in Office365 get local files?

I'm sure this is a really simple answer but I can't see the connection. Essentially I'm playing with the SPFx tutorials and I just uploaded the workbench.aspx to my shared documents and the hello ...
4
votes
2answers
397 views

SPFx: How to test for the 3 SharePoint flavors: Classic, New Experience and SPFx

When injecting code in the New Experiences (only possible with Browser Extension) I use: var isClassicSharePoint = typeof SP !== 'undefined'; So my generic library knows when to use SP.SOD and ...