Questions tagged [spfx-webparts]

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

Filter by
Sorted by
Tagged with
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
1answer
497 views

Can't get context for pnp get api calls in spfx solution

I'm having trouble getting the correct site context for @pnp/sp. It works fine in workbench but not when I deploy to a site and add to a modern page. My api calls are being made to /_api/sitepages and ...
4
votes
1answer
791 views

Deploy SPFx webpart in SharePoint 2013

I want to deploy my webpart developed with SPFx in my site on SharePoint 2013 farm. I followed this tutorials : http://jenkinsblogs.com/2016/10/04/deploy-spfx-client-side-web-part-to-a-sharepoint-...
4
votes
1answer
502 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, ...
4
votes
4answers
328 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
355 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
266 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
73 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
2answers
1k views

SharePoint Framework: How to let modern web parts interact with each other?

How can web parts know of and interact with each other within the SharePoint Framework? Here's an example. Let's say we need: a search box web part search result web part a filter web part All ...
4
votes
1answer
406 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
1k views

SPFx - REST POST Forbidden in Chrome

Problem I'm trying to create/update records in a list using SPFx. It's working as expected in IE, but I'm getting a 403 - FORBIDDEN in Chrome. Request Digest I am fetching my request digest value ...
4
votes
2answers
888 views

Facing issue in binding Kendo UI grid with SharePoint list

I am facing the issue in binding Kendo UI grid with Sharepoint List. I am getting following error, Uncaught TypeError: $(...).kendoGrid is not a function I have added scripts in the following order,...
4
votes
3answers
8k views

SharePoint Framework jQuery REST POST returns 400 Bad Request error

I am totally stumped again as to what is causing my update to fail. The same process works fine using the "old" approach inside a web content editor. Now that I am using the framework the jQuery ajax ...
4
votes
1answer
777 views

SPFx Web Parts on Classic Pages

I have discovered that some SPFx client web parts don't work the same on classic pages as they do on modern pages. I'm currently working with the SPFx Fantastic 40 WebParts. If you try to use the ...
4
votes
1answer
1k views

SPFX error: failed to load component dependency "@microsoft/sp-webpart-base'

Anyone else getting the above error? Two webparts that worked fine yesterday today are failing with: [SPWebPartErrorCode.ScriptLoadError]:: Unable to load web part WebPart.DelmeWebPart.25d255cb-...
4
votes
1answer
3k views

Adding onClick event to a React Web Part

I want to add a simple onclick function, but having trouble doing it. I have looked online, and have tried multiple ways - such as binding it - this.update.bind(this)} within the html string, etc ...
4
votes
3answers
843 views

Deploying both testing and production versions of an SPFx Webpart

I am trying to figure out how to deploy two versions of an SPFx Webpart to the App Catalogue. We need one for production and one for development. What I have tried so far: Modifying the ID in the *....
4
votes
1answer
402 views

What is SPFx and why do we need this? [closed]

I know this is a generic question but I think there are many people out there who are novice in SPFx. I decided to learn this by following This MSDN. Can someone help me to understand npm & ...
4
votes
1answer
989 views

How to force render of property panel?

How can I force the SharePoint Framework to re-render the property panel of my Client Side Web Part? In detail I would like to execute the getPropertyPaneConfiguration() method once again when the ...
4
votes
1answer
526 views

jquery not loaded with SPF

I have this on my config.json { "entries": [ { "entry": "./lib/webparts/pnpcrudsample/PnpcrudsampleWebPart.js", "manifest": "./src/webparts/pnpcrudsample/PnpcrudsampleWebPart....
4
votes
2answers
266 views

Add an SPFx WebPart from an SPFx Extension on a modern site

Within our product we have created an SPFx extension to show a navigation component on the top of our modern pages. Additional to this navigation component we want to show a button which opens an ...
4
votes
4answers
369 views

How to catch navigation event in SPFx webpart?

Is it possible to catch navigation event inside Sharepoint Framework web part? I know this is possible in application customizer using context.placeholderProvider.changedEvent, but I cannot find ...
4
votes
1answer
1k views

How to run SpFx WebPart in SharePoint Online without running Gulp server in background?

I am new to SpFx and I am playing with SpFx. I am trying the example given here. I am able to follow the steps and I am able to add the WebPart to my SharePoint Page. But after adding, I am facing ...
4
votes
1answer
402 views

How can I deploy a SharePoint Framework webpart with a Microsoft Graph API query as an add-in?

I have a set of graph queries that return the email addresses for my Office 365 Group members who are also the members of my connected SharePoint Team Site. https://graph.microsoft.com/v1.0/groups?$...
4
votes
2answers
1k views

NodeJS not compatible

when I run gulp serve I get the following error. Your dev environment is running NodeJS version v10.15.0 which does not meet the requirements for running this tool. This tool requires a version of ...
4
votes
2answers
2k views

SPFX OnChange Event

I am pretty new to the framework. I am trying to change the viewmodel based on the change of the property pane dropdown. I am trying to access the onchange event however that doesnt see to exist out ...
4
votes
1answer
615 views

SharePoint Framework: Loading icon in property pane

I wanted to show loading icon on the drop down present in property pane, till it does not get the data. I am unable to find what needs to be passed to in this.context.statusRenderer....
4
votes
1answer
477 views

SPFX Webpart Refreshing on ajax call

What it does I have a simple webpart that pulls in train information to display how many minutes are left and displays the data in the UI. There is a refresh link to refresh the data in the UI. When ...
4
votes
2answers
2k views

spfx webpart Canvas size on Modern Page

I've created an spfx webpart using the react-office-ui-fabric DetailsList. It works fine, but the details list is quite wide. On a modern page the framework is rendeing my webpart in a div that is set ...
4
votes
1answer
100 views

► Will Microsofts CDN increase perfomance for linked HTML files?

Content I pull in from a Document Library This is just f.. slow.. Same site pulls in content from our own HTTPS server Questions Will using Microsofts CDN solution par our own HTTPS server speed? ...
4
votes
1answer
623 views

How do I get Terms from termstore using SharePoint Framework?

I want to fetch terms from termstore, in my SharePoint Framework app. I have tried this microsoft sample: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/knockout-taxonomy I ...
4
votes
1answer
453 views

Is it possible to have “Cancel” button with “Apply” button for Non reactive Property Pane in New SharePoint Framework

whether it is possible to have "Cancel" button with "Apply" button for Non reactive Property Pane in New SharePoint Framework. i Have followed link https://github.com/SharePoint/sp-dev-docs/blob/...
4
votes
1answer
957 views

Multi language support for Client Side webpart with New SharePoint Development Framework

I have created a sample Hello world webpart using the Examples provided at Office site Webpart has a Property called "Description" in Property Pane which displayed in English Language. I would like ...
4
votes
1answer
370 views

Print Files through SPFx/JS?

I would like to build a button which would send a batch of files to the printer when clicked (It can prompt the user. Doesn't need to go to the printer without approval). The files would exist in a ...
4
votes
0answers
53 views

Is it possible to include fields in a sharepoint list directly from elements.xml file?

I am trying to provision a SharePoint 2013 tasks list from a spfx app using the feature framework. I am able to create an out of the box tasks list with the following list definition in my elements....
4
votes
2answers
1k views

Asynchrounously load lookup column values in an SPFX/PNP-JS-CORE editform

I'm working on a spfx app to be used as a SharePoint list form. The app will be used to edit ha a LOT of lookup columns. the lookup columns are rendered as dropdowns in the react component. I am ...
4
votes
1answer
928 views

Using ADAL with SharePoint Framework

I've setup a web part with SharePoint framework that requires access to the Microsoft Graph for displaying the recently used files. I've followed the instruction here: https://github.com/SharePoint/...
4
votes
1answer
351 views

Moving from CEWP to SPFx - import fabric components

Been struggling with this for the past few days. I am quite new to Sharepoint development. Got my head around CEWP and was using office-ui-fabric-js components with code samples from here. I am now ...
3
votes
2answers
484 views

SPFx - WebPart error after upload in SPOffice365

When i upload my web part in app catalog, after install in dev site. I have following error: How to solve this problem?
3
votes
2answers
2k views

Download attachment of item in list using REST API in SPFx

I have a custom list on sharepointonline, and I have attached a file (myfile.txt) to an item (itemid=5). How can I download this attachment? I am able download the file with this button: <a type="...
3
votes
2answers
906 views

Tutorial 4 of SharePoint SPFx Tutorials: Error configuring web part to load from CDN

i have followed HelloWorld, Deploy to CDN and until "Configuring web part to load from CDN" everything worked; i have updated the "cdnBasePath" in "write-manifests.json" as described, and continued ...
3
votes
2answers
183 views

SPFx: breaking out of the ClientSideWebPart CanvasZone

In Classic SharePoint days I would break out the CEWP (or do it straight from a UCA-ScriptLink) and add content to the DOM or even replace the whole s4-workspace Do I (each CSWP) now have to stay ...
3
votes
2answers
195 views

Calling external API in SharePoint framework

I am trying to call the dummy API from SPFX, but I am getting an error, Failed to fetch, this.context.httpClient .get("http://dummy.restapiexample.com/api/v1/employees", HttpClient.configurations....
3
votes
2answers
215 views

SPFx: Can you use WebPartContext in components different than the main one?

I am trying to call Microsoft Graph from a component, different than the main one. As a first step I am declaring a variable for the MSGraphClient's serviceKey like this: const graphClient: ...
3
votes
1answer
1k views

How to deploy SPFx web parts on SP 2016 on prem?

I am working on a development environment on SP 2016 on prem with feature pack 2. I have created a "Hello world" web part following this example. I am trying to deploy the SPFx web part to a classic ...
3
votes
2answers
232 views

SP16 On-Premise - SPFx web parts or Classic web Parts?

My company has need to migrate web parts from SP07 to SP16 On-Premise. It is clear that all the logic from the old web parts will be written from the beginning. My question is what decision we ...
3
votes
2answers
2k views

How to make Pnp function async in spfx framework

I need to get data from a function as below. GetServiceListData():any { var resultData; pnp.sp.web.lists.getByTitle('Test').items.select('Title,FullName,DOJ,ManagerName/Title').expand('...
3
votes
1answer
629 views

How to Provision Workflows with SharePoint Framework

I'm shifting my development to SharePoint framework now and have met with this problem. How do I deploy/provision a workflow to SharePoint Online using SharePoint Framework Client Web part. I couldn'...
3
votes
1answer
2k views

SharePoint Framework: how to change TypeScript version used by gulp?

I set up a new project using the yeoman template for SharePoint Framework web parts. Everything is working fine, I can run gulp serve and work in the local workbench. Good. Now I need to change the ...
3
votes
2answers
214 views

SharePoint Online SPFx Apps: Why use a CDN for assets, why not simply use the SiteAssets library?

Why do the SPFx tutorials configure a library or a folder in an library as a CDN to host assets like scripts, images etc? I mean what is the technical difference to hosting the assets in the ...