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

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

1
vote
1answer
29 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
56 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
39 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
60 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
30 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
79 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
25 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
0answers
16 views

SPFx pnp reload PropertyFieldListPicker with custom webAbsoluteUrl

Is there a way to reload the custom context for a PropertyFieldListPicker using the webAbsoluteUrl property while the pane is open? I have a custom string property: this.properties.siteUrl for ...
0
votes
1answer
29 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
38 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
25 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
29 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
21 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
34 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
61 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
15 views

SPFX Tab event key not being detected when page is published

i created an spfx app and i have a form that inputs multiple items like so: i am capturing the keydown press through: switch (event.key) { case 'Enter': this.setState({ ...
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
20 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
47 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
29 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
49 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
18 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
25 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.
0
votes
1answer
70 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
0answers
33 views

How to prevent changing iframe content after click

I would like to build a SPFx app but I don't want to build everything, I´d like to use as much as I can OTB. The idea is to have one SPO-list witch should be hidden but I would like users to be able ...
0
votes
1answer
44 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
63 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
52 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
27 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
23 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
40 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
43 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
37 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 ...
4
votes
1answer
66 views

SPFx webpart not updating with latest spkg uploaded

My Spfx spkg uploads successfully to the apps catalog. Tenant wide upload is enabled. When I do 'Add an App', This app is not available for installation under 'From your Organisation' Although when ...
0
votes
1answer
49 views

where do i need to add my custom javascript (which will be rendering the results inside the modern web part) inside my client-side web part project

I have built my first client side web part as mentioned on this link https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part. now the web part will show ...
0
votes
1answer
28 views

Return items within Date Range

My array: urlArray = dataArray.map(function(item){ return { Id: item.Id, Title: item.Title, ...
0
votes
0answers
28 views

Query data from Azure table storage using SPFX

i currently have a requirement to display Azure table storage data into a table created using SPFX (react). i have created an azure table storage already with a cosmos db storage. i have read the ...
0
votes
0answers
35 views

When bundling a SPFx web part (i.e. gulp bundle), what is the json file for that is created within temp/deploy folder?

When bundling one solution using "gulp bundle --ship", I get two files within the "temp/deploy" folder: 768ccd78-850f-4c39-b457-b9e43e9ca339.json web-part_d46327de559c749c6fed216a0c58314b.js I ask ...
3
votes
2answers
53 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: ...
0
votes
1answer
164 views

SPFx - Gulp serve fails

I had 2 webparts in my solution. But when i tried to add the 3rd webpart, it successfully adds. But after that "gulp serve" fails. Below is the error message D:\Bloom\Code\BloomWebparts>gulp serve ...
1
vote
1answer
150 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
498 views

Updating SPFX breaks gulp

So i tried installing a webpart from scratch & added React as a framework. All good, but the version of @microsoft dependencies is 1.5.1 AND the latest is actually 1.6.0. I've tried updating ...
0
votes
1answer
109 views

SPFX webpart context is undefined

Ok so i've searched for a while and tried everything. I've followed these steps as well -> How to retrieve pageContext in SPFx? So far its just a "testing phase", but i get stuck at the beginning ...
2
votes
1answer
185 views

Script to add SPFx webpart to a classic page using PnP Powershell

I have to run a Powershell script that creates a Site Collection App catalog , then add an SPFx webpart to it and publish it. Also it has to install it in the site. I have done upto this part. Last ...
1
vote
1answer
503 views

SPFx problem with code from github

I'm trying to use the CDB promoted links webpart (from github) for modern pages but I need to make changes to the code (just the colours, nothing structural), So far so good- runs on the workbench but ...
0
votes
1answer
20 views

Spfx webpart - single web part with 100+ forms in it

I am creating a spfx-ReactJS web part for O365 site. This is actually a java to sp re-engineering. Legacy java app has 100+ pages, I am trying to put all of these into one spfx webpart and add it to a ...
1
vote
1answer
129 views

SharePoint Framework SPFx - Using PNP js How to get and save value in Yes/No sharepoint column

I am creating custom webpart in SPFx. I have a yes/no column. I have to use PNP js to get the value, when that check box got selected. That value I should save it in SharePoint column as Yes, if its ...
5
votes
3answers
360 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 ...
1
vote
2answers
159 views

Trying to use SPFX + React. Error “yo : The term 'yo' is not recognized as the name of a cmdlet”

I want to build my first SPFX React web part, so i am following this article:- https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/use-fabric-react-components first step i ...