Stack Exchange Network

Stack Exchange network consists of 174 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.

22
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? ...
10
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 ...
8
votes
1answer
201 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
1answer
569 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 ...
7
votes
1answer
3k 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
758 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 ...
7
votes
1answer
1k 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 ...
7
votes
3answers
856 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 ...
7
votes
1answer
219 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 ...
7
votes
0answers
136 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 ...
6
votes
2answers
3k 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!"); }
6
votes
1answer
522 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
180 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
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
2answers
764 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
457 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
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 ...
5
votes
2answers
2k 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
3answers
3k 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
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 ...
5
votes
1answer
397 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
452 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
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 ...
5
votes
3answers
4k 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

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
317 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
1k 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
397 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
342 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
987 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
663 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
405 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
164 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
172 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
1k 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
244 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 ...
4
votes
2answers
5k 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 ...
4
votes
2answers
664 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
1answer
132 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 ...
4
votes
1answer
3k 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. -...
4
votes
2answers
2k views

SPFx - PnP-JS-Core - Check if list exist in current web

I want to check if list(by Display Name) exist in current web. In pnp developer guide is no information on how to work with lists? I need this for validate web property and i want to use pnp-core-...
4
votes
4answers
307 views

SharePoint Framework web parts - do you need a developer tenant?

I want to test my SharePoint Framework web part in Office 365, in SharePoint Online. Therefore I upload the .sppkg file to the App Catalog. Unfortunately SharePoint says my app package is invalid: ...
4
votes
1answer
296 views

Using bootstrap in SPFx RC.0 webpart

I searched and used below code snippet: import * as React from 'react'; import styles from './Announcements.module.scss'; import { HttpClient, SPHttpClient, SPHttpClientConfigurations } from '@...
4
votes
1answer
241 views

Missing workaround in SPFx JQuery WebPart

In the SPFx JQuery tutorial there is this instruction :- For drop 1, there is a workaround needed when loading css files (later on in this tutorial we will show you how). For now, you need to include ...
4
votes
1answer
51 views

Should I rewrite all the existing jquery ajax webparts in Typescript or is it better to inject existing jquery in SPFX?

We are moving from SharePoint 2013 to SharePoint Online. We are thinking of migrating existing webparts in 2013, which have jquery - ajax, to SPFX client webparts. Do we have to rewrite all the code ...
4
votes
1answer
309 views

Get all the user info using Microsoft Graph

How can I get all the user info, from a SPFX WebPart, using Microsoft Graph? I need to call the API 'https://graph.microsoft.com/beta/me/' to get the user info from a SPFX WebPart. I'm using SPFX ...
4
votes
1answer
378 views

SPFx Client Web Part - Store In Properties or List

I'm trying to get to grips with the SPFx client web part. I've read examples of people creating "items" which are stored in the web part properties. This looks great. No need to provision a list, ...