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.

1
vote
1answer
42 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
0answers
38 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
16 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
44 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
16 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 ...
0
votes
0answers
11 views

Deployment Error in SharePoint APP SPFx

Additional article idea i've made two XML File: one for elements and the other for the schema. Elements.xml: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft....
4
votes
2answers
221 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
18 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
20 views

Get Title of Person From People Picker field with multi-selection Allowed using SPFX

I build a Spfx webpart to get the values from list but i have one field which has allowed multi-user selection in people picker field when i get it it seems undefined. ChargeBackTaskAssignTo:{ ...
0
votes
0answers
17 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
29 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
20 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
34 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
43 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
22 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
33 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
37 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
20 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
39 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
67 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
51 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
76 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
35 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
88 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
29 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
39 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
58 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
43 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
35 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
25 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 ...
0
votes
0answers
42 views

Problems loading in external JS SPFX

I am trying to embed a yammer open graph feed into a custom web part using SPFX. I have the following: config.json "externals": { "YammerEmbed": { "path": "https://c64.assets-yammer.com/...
0
votes
0answers
62 views

What's the state of eventAggregator for sharing data in SPFx?

What is the current state of eventAggregator in SharePoint Framework? It can be used to share data between web parts as described in this blog post and demoed on GitHub. Above info is rather old (mid-...
0
votes
1answer
21 views

Power BI webpart not visible when adding it with OfficeDevPnP

I am creating a console app that will create sitepages with certain webparts in it. To Manage this I am using OfficeDevPnP and how I do it is described in the text below. The issue here is that the ...
0
votes
0answers
30 views

spfx webpart custom themes

I have created a simple webpart then I define background for element background-color: "[theme: themeDark, default: #005a9e]"; , and on site page it inherit color and show themeDark of current set up ...
0
votes
0answers
24 views

is there property called ''pdfConversionUrl' in sharepoint extension

I found pdf conversion url like this https://northeurope1-mediap.svc.ms/transform/pdf?provider=spo&inputFormat=docx&cs=fFNQTw&docid=https%3A%2F%2Fdenterprise.sharepoint.com%3A443%2F_api%...
0
votes
1answer
53 views

spfx peoplepicker- change state on remove suggestion

I want to change a state when the user remove a person from people picker? <NormalPeoplePicker onChange={this._onChange.bind(this)} onResolveSuggestions={this....
0
votes
1answer
41 views

How do i get current aspx sitepage with SPFx

I have build a webpart with SPFx and using following libraries @microsoft/sp-core-library": "1.6.0 @microsoft/sp-lodash-subset": "1.6.0 @microsoft/sp-office-ui-fabric-core": "1.6.0 @microsoft/sp-...
0
votes
1answer
57 views

How to default select user in People Picker?

I want to set default selected user on people picker? <NormalPeoplePicker onChange={this._onChange.bind(this)} onResolveSuggestions={this._onFilterChanged} ...
0
votes
0answers
23 views

Peoplepicker get all users in tenant

How can I get all of the users in my tenant? I get just the users in a group. This is my code: private _getPeoplePickerItems(items: any[]) { console.log('Items:', items); } public render(): ...
0
votes
0answers
29 views

Spfx webpart: how can we update selected item doc icon only using reactjs

In spfx web part, When I select an item and check out it is checking out item as expected. But i would like to change the icon to indicate check out status. Thanks in advance.
1
vote
1answer
105 views

spfx get value from input

How te get the value from input, i always get the default value from the input field. This is my code: export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps&...
0
votes
1answer
51 views

spfx MSGraphClientt

I need to write a webpart, which shows data from the MS Graph. I wrote this example code import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart, ...
2
votes
1answer
81 views

Add Dynamic Property Panes to SPFX

I know this has been asked 1000 times, but i've tried everything in the first 2 pages of google so i've decided to come to you guys for help. I'm trying to create some dynamically added property ...
0
votes
2answers
56 views

SPFX Web Part Disappears on Save

I have a weird issue. In this one web part, it works when I add it to a page. But it disappears once the page is saved. Additionally, web part properties for the web part also don't persist. Once a ...
1
vote
1answer
29 views

Cannot deploy SharePoint Framework packages anymore after upgrade to SPFx 1.6

Cannot deploy SharePoint Framework packages anymore after upgrade to SPFx 1.6. Few blogs suggested that its because of the webApiPermissionRequests crossing more than 255 characters. Is there any ...
0
votes
0answers
28 views

Shimmer is absent in package 1.5.1

I am building the SPFx webpart (1.5.1 version) using yeoman, and it deploys the same fabric core version automatically (1.5.1). I chose the React framework. So in project's package.json I see "@...
0
votes
0answers
57 views

GroupedList renders checkboxes not in correct way

I use Fabric UI GroupedList component together with Checxbox component, but it seems to work not in correct way. When I put сheckboxes in GroupedList they become to work not as usual. The checkboxes ...
0
votes
1answer
76 views

pnp/sp how to return user information after creating a list item?

I am creating an SPFX webpart and i have to call pnp/sp to check if a list item exist and if it isn't i will create a new list item. this is my code for creating a new list item: return sp.web.lists....
0
votes
0answers
44 views

Issue with SPFX 1.1.0 and VueJs

I have been trying to implement version 1.1.0 of spfx with VueJS as it has SP2016 on prem support, every example and guide I have tried fails to build when using the older version of spfx. When ...