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.

1
vote
1answer
31 views

Steps to setup SP2016 onprem with React using SPFX

I am trying to setup SP2016 onprem with React, using Yoeman generator @microsoft/sharepoint. I am getting errors when I run gulp serve. Need Help on setting up this project using SPFX. I have ...
0
votes
0answers
11 views

Error in webpart after upgrading to SharePoint Framework 1.8

I have just upgraded to spfx framework version 1.8. When I try to add the webpart to the page, I get this error Original error: Error loading https://component-id.invalid/f2f8e00f-ef2a-4909-b24a-...
1
vote
2answers
820 views

httpClient Upload file to SiteAssets

How can I upload a file to the current web SiteAssets or document library using the spfx httpClient? Is there a code sample I can learn from?
0
votes
0answers
13 views

What parameters need to be listed for HTTP Request

I need assistance to determine what the 'Request Body JSON Schema' should be, to allow Flow to trigger via HTTP request to pass the List Item ID as a query string parameter. I am working on a list ...
1
vote
0answers
27 views

SPFX Webpart with Dropdown don't work on Classic pages

I currently have a spfx web-part which contains a dropdown, when I add it to a classic page and try to use the dropdown when the SharePoint ribbon displays the Format Text tab, the dropdown keeps ...
0
votes
0answers
15 views

Stop Property Pane closure on validation fail

I am looking to find out the correct way to stop Property Pane closure or update on validation fail. I can't see anything in the SharePoint documentation and am thinking one way to do it would be to ...
0
votes
1answer
25 views

Loading external JS sources prior to any other scripts in SharePoint Framework

Deploping on SharePoint Modern, I am using this React Content Query Web Part and added two of them on the page. One of them will need slick.js and another one is using masonry.js, both of which ...
0
votes
0answers
29 views

List recently access documents

I am trying to develop a web part the lists the logged on users recently accessed documents, as per the home page of www.office.com, and the recent documents tab. I originally thought this ...
1
vote
2answers
989 views

Cannot Find the Module Error spfx webpart

I have scaffold-ed an spfx webppart project. But I am getting the following errors on compilation: -> Cannot find module 'ToDoWebPartStrings' -> Cannot find module './ToDo.module.scss' -> ...
1
vote
1answer
55 views

Update List Item SPfx not working

Below is the code, which is not working, shows below error An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected. const body: string = ...
0
votes
1answer
26 views

Can I use SPFx 2019 webpart to 2016 on-premises?

I have created SPFx webpart for SharePoint Online and 2019 on-premises. Now I want to run same webpart on Sharepoint 2016 on-premises. So my question is that Can I run same webpart on 2016 by doing ...
0
votes
0answers
12 views

SPFx Web part not retaining the Property values

I have a SPF'x web part (SPF'x V1.1 as its for On premise) which has 2 string type of properties. It was working fine in my QA environment. But in Prod, The properties not retaining the values. I have ...
0
votes
2answers
373 views

client webpart multiline displays as one line only

I am trying to create a multiple line webpart property using this code: PropertyPaneTextField('test', { label: 'Multi-line Text Field', multiline: true ...
3
votes
2answers
754 views

Office UI Fabric DetailsList(React) rendering: DetailsColumn.render() error

I am trying to add a very basic implementation of the Office UI Fabric's DetailsList React component to my project, but keep on getting the following error when trying to render it: 'DetailsColumn....
0
votes
1answer
25 views

Is it possible to change the language (strings) of a SPFx webpart inside the webpart?

I have a SPFx webpart with "de" and "en" locales and want to change the language with a button in the webpart. How can i change the locales? SPFx webpart on a modern page.
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 ...
4
votes
2answers
192 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 ...
0
votes
0answers
11 views

provider hosted Add-Ins and provisioning modern pages

I am doing a a review on various (classic) sites, to see how much work is needed to migrate these to modern communication, team and hub sites. I found a load of provider hosted apps available for the ...
1
vote
2answers
295 views

SPFX 1.6 msGraphClient error on SharePoint app

I created a SharePoint Framework 1.6 webpart which uses the MSGraphClient. On all browsers (tested with IE11, Edge, Chrome on laptop. Tested with Chrome, Edge, Samsung browser on cell phone ) this is ...
0
votes
1answer
41 views

Access other Site collections in SPFx web parts

We have a requirement to convert one of the existing provider hosted app functionality to spfx webpart. The provider hosted app implemented using App only calls to access other site collection in the ...
5
votes
2answers
838 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 = ...
0
votes
1answer
23 views

Error Handling in onInit()

I'm loading information from a SharePoint list in the onInit method. Now I'm wondering how to handle errors. My expectation was that if there's an error the returned promise would fail and some ...
0
votes
1answer
835 views

set office ui fabric datepicker format

How to set date format in UI-Fabric DatePicker component ? my code here <DatePicker firstDayOfWeek={firstDayOfWeek} strings={DayPickerStrings} placeholder="select date..." /> I ...
0
votes
1answer
25 views

MSGraph with spfx WebPart does not propt user for permission

I am expermimenting with people in MSGraph. I am attempting the "/me/people" graph call and getting a 403 forbidden. The People.Read permission states it does not need Admin Consent. People ...
0
votes
0answers
25 views

Aditional properties not allowed SPFX webpart error

I'm getting this error when I use gulp serve Blockquote Error: #/localizedResources (A set of localized resources, to be d...) Additional properties not allowed: v3WebPartStrings Error:...
1
vote
1answer
25 views

SPFx Document Search Result Add-in with ECB / CommandSet option

we are building SPFx based document listview based on search / user personalized view - my bookmarks or recent document; We want to plug in OOTB ECB menu / command set; is there any option to ...
1
vote
0answers
54 views

Adding sections and web parts to the modern pages is not working

@pnp/sp version is 1.2.3/1.2.7 SharePoint version is SPO (online) I am loading the site in the Web object and adding the client side page using the web object. Once the page got created I am adding ...
2
votes
1answer
67 views

SPFX 1.7.1 - Full page apps - How to configure

So i've been away from SPFX for a while since they were still using the older version of React and i've got a question. I can see that they added a developer preview of "Full Page apps". How can you ...
3
votes
1answer
814 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 ...
0
votes
1answer
52 views

Question regarding Typescript version in SPFx

I have few SPFx related queries as mentioned below. What is the current version of typescript in SPFx v1.71? if it is not the latest version then is there any plan to upgrade? It will be great to ...
2
votes
1answer
23 views

Get User's Time Zone using PnPJs

We are trying to retreive current user's profile Time Zone SPS-TimeZone from a SharePoint Framework webpart, but we are faicing an error (see below). Does anyone know about the best/most effecient way ...
0
votes
1answer
23 views

This function always return extra values

While calling the function always get "x" extra added value . Suppose I have received 3 values on 1st call , next 2nd call I received (3 + 3) values , and on 3rd call (6 + 3) values . But I want to ...
1
vote
0answers
39 views

Spfx web part to show task list on modern sharepoint UI

I am looking to leverage team sites for one of my projects. Since modern UI only supports custom lists in web part view, I am looking for some help on how Spfx can be used to show task list web part ...
3
votes
2answers
862 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 ...
0
votes
0answers
41 views

Error loading SP-webpart-workbench during SPFX webpart tutorial

I have been trying to walk through the tutorial "Build your first SharePoint client-side web part (Hello World part 1)", and I have found it to be quite troublesome. I've worked through many of the ...
5
votes
1answer
78 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 ...
4
votes
2answers
835 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 ...
2
votes
1answer
90 views

Create document set with REST API in SharePoint Framework

I'm looking for a way to create a document set in my document library from within SPFx web part. I'm using @microsoft/sp-http module to create HTTP requests. Do I need to manually create some ...
1
vote
1answer
886 views

SPFx: Failed to load path dependency from component

I am trying to create a SPFx webpart and use a jQuery plugin. Below are the steps I followed. Created a SPFx solution using yo Installed jQuery through NPM Installed jQuery.payment (plugin) through ...
0
votes
1answer
41 views

Calling MS Graph API: An error as soon as declaring the MSGraphClient

I have imported the MSGraphClient in my project using the following statement: import { MSGraphClient } from '@microsoft/sp-client-preview'; I have also added those two import statements, as I will ...
0
votes
0answers
57 views

Connect SPFx webpart and SP list using dynamic data

I know a SPFx webpart can be connected to another SPFx webpart using PropertyPaneDynamicFieldSet and PropertyPaneDynamicField. My question is can a webpart being connected to a SP list? I'll connect ...
1
vote
2answers
578 views

How to edit a Rich Text Field in an SPFX Webpart

I am creating an spfx webpart to allow users to edit some items in a list. I am trying to use office-ui-fabric-react for all the controls as recommended. The list has a rich text field(Enhanced rich ...
-1
votes
5answers
4k views

SPFX Error loading webpart

I'm trying to run the SharePoint framework example from GitHub SharePoint/sp-dev-fx-webparts and I'm having different behaviours between my local workbench and the SharePoint Online workbench in my ...
2
votes
0answers
23 views

Error in seting up spfx 1.7 with angular 7

Hi I am setting up a SPFX 1.7 project with Angular 7 using the sample which is done with previous version. https://www.youtube.com/watch?v=_OgEqWtouuU https://winsmarts.com/use-spfx-with-angular-cli-...
4
votes
1answer
878 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/...
1
vote
0answers
50 views

SPFx Custon Property Pane not opening

I have created one custom SPFx webpart in which I have placed one link (My Links). By clicking on that link, I am getting links from SharePoint list. When user clicks on the link, it opens Property ...
0
votes
0answers
22 views

Unable to print result in spfx react (got the data)

Getting data from SPFX React (json) - this.state = { testProperty1: "", hideDialog: true, showModal: false, items: [ { Id: "", title: "", ...
0
votes
1answer
53 views

Error while creating list item with multi-user field - pnp js / spfx

In my spfx webpart, I'm creating list item using pnp js. As per pnp-core-js documentation I have written following code, but its failing with error. Private AddListItem() { pnp.sp.web.lists....
1
vote
1answer
59 views

spfx pnp search API: Search by content type and part URL

I have a requirement to makes an SPFX search webpart that can be searched by content type and also partial item url but it has to only return a specific content type from all sites accept root. The ...
1
vote
2answers
47 views

Error when using 'boolean' type property in spfx

I have used office ui fabric 'Checkbox' component in my spfx. For storing value of checkbox I have declared one property with name 'var_Passport' as 'boolean' type. further, I'm assigning value (true/...