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.

0
votes
0answers
7 views

Failed to execute 'json' on 'Response': body stream is locked

I am following this article and get the following error in the console.log Uncaught (in promise) TypeError: Failed to execute 'json' on 'Response': body stream is locked at e.json (sp-pages-...
0
votes
1answer
30 views

A service principal with the name User Details Custom API for SPFx

I am consuming an Azure API app in a SharePoint Online react app. I am following this article. But when I try to approve the app permissions on the API management page (SharePoint admin centre). I ...
0
votes
0answers
16 views

Provisioning SPFx WebPart assets: adding a page with your webpart embedded to it

As far as I can see it should be doable to create a package which can automatically, once the app is added to your site, to create a page and embed the webpart on it - as described here: https://...
3
votes
1answer
28 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 ...
0
votes
1answer
20 views

Sharepoint (SPFx): APIs working on workbench but on modern pages the /sitePages/ path appears

I'm fairly new to the sharepoint framework so this maybe something quite fundamental that I have misunderstood but here goes: I'm working on a sharepoint framework typescript / react webpart that ...
0
votes
3answers
23 views

Deploy spfx webpart without using cdn

I am currently developing some spfx webpart and i have deployed the webpart and using a SharePoint library as cdn. My question is: Can i deploy the webpart without using a cdn?
1
vote
1answer
28 views

Create SPFx webpart based on existing webpart (Text)

Is there a way to create an SPFx webpart that extends or is otherwise based on an existing built-in webpart? In particular, I want to create a text editor using the default "Text" webpart. I would ...
0
votes
1answer
33 views

How to add checkboxes to propertypane dynamically

I have a dropdown on my property pane which i populated with sharepoint lists. What i want to do now is to add the columns(fields) of the list(selected on the dropdown) as checkbox(on the property ...
0
votes
1answer
28 views

Cannot read property of undefined in spfx

Hear is a SPFx react webpart ".tsx" file code image Have you any solution ?
1
vote
1answer
21 views

Get list of alerts of the current user from the whole site collection

My scenario: i want to create a spfx web part that uses a rest API that will query all the alerts throughout the whole site collection for the current user. I want to know which API to use and ...
0
votes
1answer
25 views

SPFx - Accessing/appending markup that has been entered in via a property pane text field to webpart

I am currently working on an SPFx webpart. Within my property pane I have: PropertyPaneTextField('CreateNewVerticalNav', { label: 'Create New Vertical Nav', multiline: true, ...
0
votes
0answers
33 views

package error when building spfx webpart

I am using the following breadcrum sample. To reproduce the error use command: gulp serve Error I got: ./src/extensions/siteBreadcrumb/SiteBreadcrumbApplicationCustomizer.ts Module parse failed:...
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
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 ...
1
vote
1answer
33 views

Office UI Dialog not showing correctly on SPFX Web part

On the SharePoint Workspace the UI dialog works fine. The dialog comes out when you click on Forward Case. When I have gulp packaged the solution and adding the app (locally on gulp) then I get this ...
0
votes
0answers
12 views

while New list createion in SPFx issue

I am using SPFx in my project for project createion. While adding project in my List, new 10 dynamic list created using SPFx in backednd it takes 30 second to complete the opertaions. Client ...
0
votes
0answers
25 views

How to reset Office-ui-fabric accordion

I m using office ui fabric dropdown with office ui accordion . Is there any way to reset accordion items to collapsed mode after changing dropdown value. <Dropdown ...
2
votes
0answers
24 views

MS Graph API - Problems on SPO Mobile-App

The Background: I am developing Sharepoint Online Webparts on-demand. Sometimes the functionality of these Webparts include the use of Microsoft's "Graph-API" to access Data regarding Office 365 ...
1
vote
0answers
19 views

SPFX Angular Element with UI-Router not displaying data

Iam testing Angular Element with SharePoint Framework (SPFX) Webpart, as Andrew Conell has described in his Blog Every thing is working as asspected, i have added UI-Router in webpart just for ...
0
votes
0answers
21 views

How to load all SPFx webpart on a page after a rest call complete?

I am making a rest request to get user groups and that is required in each SPFx webpart to do some further operation. Scenerio - If 6 SPfx webparts are added on a page and each SPFx webpart is ...
1
vote
1answer
48 views

Add files to subfolders using rest api in javascript

What is working right now is i can upload to the root folder of a library using the code below : myDropzone.options.url = `${_context.pageContext.web.absoluteUrl}/_api/web/Lists/getById('${_parent....
2
votes
1answer
54 views

Rest API to update a library item giving 400 error

The code am using: pnp.sp.web.getFolderByServerRelativeUrl("Shared%20Documents").files.getByName("test.jpg").getItem().then(item => { item.update({ Title: "A Title", ...
2
votes
1answer
115 views

SPFx Office UI React - How to default select user in People Picker

On componentDidMount I have received the current logged in user using MSGraphClient. I have saved the object that I received from graph in fullObject variable. I am using below code: <...
0
votes
0answers
26 views

Update file metadata in an spfx webpart

i am trying to update a file properties that i have just uploaded. Once the file has been added to the library,i am doing another http request to get the file properties but it is not working.i can't ...
1
vote
0answers
65 views

SPFx web part is not loading in IE 11

I have a SPFx web part with Knockout framework. Its developed for SharePoint on premises (V1.1.0). Deployed all the Assets in the SharePoint library. Application is working fine in Chrome. But in IE, ...
0
votes
0answers
23 views

web part uses default values instead of new value from propertypanetextfield

I am using a react web part. I don't understand why my web part is using the default value instead of updated value from the propertyPanetext field. Isn't this behavior supposed to be reactive. There ...
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 ...
2
votes
0answers
20 views

Update a library field when uploading a file using javascript

I am using a spfx webpart to upload a file and modified a column value associated tothat file. The code below works and stop working without any reason and i can modify only the title field with it. I ...
0
votes
0answers
18 views

The connection was reset : SPFX

I keep getting this connection was reset error when i try to deploy a spfx webpart to the local workbench. My current node version is 8.11.4. I have set NODE_NO_HTPPS=1,change the ports to 8080,...
2
votes
1answer
54 views

View SPO Modern list in SPFX

I'd like to ask if its possible to achieve something like this -> https://collab365.community/create-manage-sharepoint-list-teams-tab/?fbclid=IwAR0FhFIvH9S51ZNvJbcR_dtFzl0Xe2zljyNP-...
2
votes
0answers
27 views

Office-UI-Fabric Pivot with React Router? Possible or not?

I face real challenge (at least for me) so I decide to ask for some help here. I'm building SPFx app where I'm using Pivot from UI-Fabric and I would like the current user to be able to navigate back ...
1
vote
0answers
35 views

How to remove list from site when spfx web part removed?

Modern SPFx web part creates a new list 'abc' using code when it is added to site contents. Now I want to remove list 'abc' automatically when web part is removed from site contents(using code not ...
2
votes
1answer
91 views

spfx context undefined

in my react component i use msgraph but i get the message "cannot read property 'context' of undefined" My code: this.context.msGraphClientFactory .getClient() .then((client: ...
1
vote
1answer
29 views

Terminate batch job in SPFx

In spfx, If we press 'ctrl+c' during any continue process then display a message 'Terminate batch job (Y/N)?' you press Y for yes and N fro No, but both the case y and N terminate the batch job. so it ...
1
vote
0answers
41 views

DetailsList component row rendering issue

There is a DetailsList component inside spfx webpart, which loads all the documents/files using PnP. There is a office-ui-fabric-react check out button outside DetailsList component. When I select ...
2
votes
0answers
113 views

Sharepoint Framework Dialog, Modal and Panel not working

I have created a web part in react js which contains a Microsoft office UI fabric control "Modal" and it pop outs on a button click. This feature works fine on my local workbench but whenever I ...
3
votes
2answers
76 views

force user to add metadata when uploading docs

I want that my users are forced to enter metadata when they upload/bulk upload document.When bulk uploading document it would be cool that users add the metadata once and it applies to all the files
0
votes
0answers
27 views

SPFX: Custom action to move bulk document from one library to another and adding metadata to these files

My scenario: I need to be able to bulk move files from one library to another and also bulk add metadata to those newly move files. I thinking of creating an spfx/react application or any method is ...
1
vote
1answer
40 views

Add SharePoint Site collection Administrator to SharePoint Online

Is there any way to add a user as Site Collection Administrator in SharePoint Online Sites using Rest API or pnp js?. I am using SPFx react js webpart. I have code in c#, but I cannot use it in my ...
0
votes
1answer
93 views

How to connect react web part to azure sql database? [closed]

Any advice about how to connect a spfx web part using the react template to an azure sql database. But can't seem to find a clear example. I'd be looking to bind controls e.g. Combo boxes to a sql ...
2
votes
1answer
86 views

How to apply a theme to a spfx web part?

I have a spfx web part the gets and displays list items. I'm not sure how to apply a theme to this web part so that the font type and style of the web part title and list items match the rest of the ...
3
votes
1answer
117 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 ...
1
vote
1answer
45 views

SharePoint Framework/ issue/ drop down change event on web part/

I want to use drop down control on SharePoint framework webpart(done) and on change event to call some method/ some rest api and so.but it is not allowing. I did not find any article where spfx web ...
0
votes
2answers
94 views

Getting error 'response.map is not a function' trying to map a list items with managed metadata fields in spfx react solution

I am trying to get items from a links list with managed metadata. I am getting an error 'response.map is not a function'. I have used the sample from this answer to get the data using ...
0
votes
1answer
36 views

SPFx and WebPart - failure : Not deployed on my site, not added in site content but still usable?

We have programmed a Survey WebPart for a customer. But, drum rolls please, .... it does not work as it is expected to. Let me explain : We created the customerWebparts.sppkg with Visual Studio ...
0
votes
1answer
66 views

SharePoint Online REST - The HTTP header ACCEPT is missing or its value is invalid

I am building an SPFX web part and trying to get data from a list using REST. Don't want all that noise returned so trying to use odata=nometadata. I've read this and this and plenty of other sites ...
0
votes
1answer
80 views

Can I add an item in a predefined list via listview command set(Sharepoint Framework Extension)?

Using SharePoint Framework extension, I have a list command set for a document library in SharePoint online. On this button being clicked, I want to add an item in a predefined list in sharepoint ...
0
votes
1answer
64 views

Sharepoint O365 pnp js get all users

I know this has been asked several times but I haven't found a viable solution. I am building a spfx webpart where I want to display every single user with name, title, email etc. I am using the pnp-...
0
votes
1answer
45 views

SPFX: How to build a welcome web part where that web part displays the current user login name when they logged in [closed]

How to build a welcome webpart to show the current user name after welcome in sharepoint online
1
vote
0answers
26 views

Hide/Remove Item Content Type from a SP List in SPFx

I am using SPFx webpart on SP2016 and able to create a list with custom content type,below is code sample. But I am not able to get any end point to remove default Item content Type. I want my custom ...