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
0
votes
0answers
64 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
25 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,...
0
votes
0answers
109 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 ...
0
votes
1answer
146 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
173 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
0answers
74 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
243 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
170 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
1answer
62 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, ...
0
votes
2answers
186 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 ...
0
votes
1answer
254 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
1answer
60 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
49 views

Return items within Date Range

My array: urlArray = dataArray.map(function(item){ return { Id: item.Id, Title: item.Title, ...
0
votes
1answer
465 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 ...
0
votes
2answers
176 views

SPFX Angular *ngFor not working with routing

Iam using Angular project from Sahil Malik's blog Use SPFx with Angular and Angular CLI as a startup solution/project.... And i implemented "@angular/router" for routing with some test pages. Just ...
0
votes
1answer
147 views

How to Call 3rd party API using Azure function and display in SharePoint online Site using SPFx?

I have create one azure function to call 3rd party API and used application ID in SPFx webpart but when on 'gulp serve' it shows error. I have tried in both team site as well as developer site. I am ...
0
votes
1answer
56 views

can we check if the same package (npm package) loaded twice on the sharepoint modern page?

we are using private module (equivalent to dll) for logging the issue in SPFx to list. i am not sure if the private module is been downloaded multiple time or one time on the modern page. we are ...
0
votes
1answer
26 views

angular-aad-implicitflow

I see in SharePoint PnP Git repo: https://github.com/SharePoint/sp-dev-fx-webparts/blob/master/samples There is react-aad-implicitflow why not there is angular-aad-implicitflow. Is there any ...
0
votes
0answers
174 views

How to use the reusable components in SPFx projects

I am working in a SharePoint Framework (SPFx) project in Online version. We have created two separate projects, one is main project and another one is common project. The common project will contain ...
0
votes
1answer
726 views

SPFX Question Is it possible to include a custom font reference by extending the toolchain?

I have a custom font, I include it in the bundle and add it to the dist folder, but the js reference is still linking to its original location. Any ideas? [
0
votes
1answer
106 views

Unable to Send Email from SharePoint Code Behind

I am unable to send emails from SharePoint code behind. I've tried the following code: public static void SendEmail(SPWeb spWeb, string Subject, string message, string ToName, string ToEmail) { ...
0
votes
0answers
949 views

Local gulp not found

I am new to SpFx and this might be very much basic question. I have followed instruction mentioned in below page and when I ran "gulp serve" command I got an error which says "Local gulp not found" ...
0
votes
1answer
260 views

Handlebars with spfx, Module not found

I am trying to use handlebars in a client webpart using these posts: https://n8d.at/blog/how-to-use-handlebars-in-sharepoint-framework-projects-spfx/ https://n8d.at/blog/first-handlebars-web-part-in-...
0
votes
3answers
1k views

Add OnClick Event to SPFX Html - No Framework

I have an SPFX Web Part (No Framework) and would like to add an onClick event to my which will call my function swap(). Code: export default class ExpandableIFrameWebPart extends ...
0
votes
0answers
99 views

How to access a file stored in SharePoint Document library which is Public CDN

I have a sharepoint document library.I have made this library as Public CDN. This library contains some files. Now i m trying to access the files inside SPFX but it doesnt work ? image I am getting ...
0
votes
1answer
306 views

Need help with url and rollup image fields in sitepages using SPFX with REST

I'm new to SPFX and still trying to find my way around. At the moment I'm struggling to access particular fields from site pages using REST. I realize this is a n00b request, but any help would be ...
0
votes
1answer
66 views

Calculated column not provision to List

I have tried to provision a Calculated column to SharePoint using the SPFx but it seems the column is not added to List. It's provision successfully to the Site Columns as well as the Content Type ...
0
votes
1answer
1k views

React State in Property Pane?

While using SPFx with React how do I use state in the property pane to change and manipulate values instead of default properties? Can I add state to the BaseClientSideWebPart? Or is there another way ...
0
votes
1answer
152 views

Correct JSON format to add a user to group using REST POST call in spHttpClient? “Input string was not in a correct format.” error

I am getting an '“Input string was not in a correct format.” error after submitting the following POST call: any idea what I might be doing wrong here? const addUserURL: string = newWeb + `/_api/web/...
0
votes
1answer
583 views

Create a subweb using REST in SPFx: SyntaxError: Unexpected end of JSON input

I am trying to create a classic subweb using a POST REST call in SPFx. Any idea what I am doing wrong here? const postURL: string = `${this.props.context.siteUrl}/_api/web/webinfos/add`; const ...
0
votes
0answers
231 views

How to reference strings.js in SPfX? (Uncaught TypeError: Cannot read property 'STS' of undefined)

I am trying to migrate my code from Classic experience to SPfX. My code is using the SP.UI.ModalDialog, and I have referenced successfully the MicrosoftAjax.js, SP.Runtime.js and the SP.js files in ...
0
votes
0answers
293 views

Error while using @microsoft/sp-dialog in SPFX TS1005

When using Dialog class from sp-dialog, gulp serve throws the error. Created an SPFX project with react framework. installed sp-dialog with the following command. npm install --save in the .tsx ...
0
votes
1answer
273 views

Why doesn't DOM element behave when setting visibility or display with SPFx/Typescript?

code snippets here produce/render expected data and alert box shows [object HTMLDivElement] the div will not hide; same is true using "visibility", "hidden" <p> <input id="...
0
votes
3answers
2k views

getting current logged in user in SP list

I have made one webpart using spfx, on submit button its values are pushing in SP list but in SP list I want user who is currently logged in, its value should come in one of the field of Sp list, how ...
0
votes
0answers
41 views

Interaction with Lists in SPFx

Are there any tutorials which are better than the Microsoft Tutorial for explaining integrating with lists? I've found the one provided by MS to be outdated and skips actually doing anything with ...
0
votes
1answer
1k views

WebParts keep loading untill I scroll down the page or perform a zoom

environment:SharePoint online;Sharepoint Framework; Programming languages:TypeScript During page loading, sharepoint custom web part keeps on loading Nothing does change untill I scroll down the ...
0
votes
1answer
210 views

SPFx -Error when use last version of Office-UI-React with SPFX 1.4.0

I want to use last version of Office-UI-React with SharePoint Framework v 1.4.0 with TypeScript Version 2.2.2. When i install last version office-UI-React have following error:
0
votes
1answer
906 views

How do I get data from sharepoint list in webpart in spfx

I have make one web part in spfx, I am able to fetch values of all columns of sharepoint list except one which is of type person or group, In this column there are multiple names I want to fetch all ...
0
votes
0answers
196 views

Why don't the SPFx web parts below the first one load on a page?

Is there a way to make sure all the content, or at least the first few web parts on a page load right away? I have a SharePoint Online classic view page that has four different custom SPFX web parts. ...
0
votes
2answers
144 views

Webpart visible in edit but disappears in preview

UPDATE I've tested on different tenants, it seems to only work in those that isn't a first release tenant. It doesn't even work with the default built-in webparts that have been served by microsoft. ...
0
votes
0answers
240 views

SPfx gulp-serve command not launching the browser page in local host

I have created HelloWorld web part from this tutorial. The command yo @microsoft/sharepoint and gulp trust-dev-cert executed successfully. After that, I executed gulp serve command which shows below ...
0
votes
0answers
146 views

After change regional settings, pages with SPFx webparts gives unexpected error has occurred

After change regional settings in SharePoint 2016 On-Premise server to Bulgarian, Macedonian оr other Locale I have following error: Error from log file by corelation ID is: Message : System....
0
votes
1answer
105 views

SPFx, provisioning the DisplayName

I'm trying to provision a sitecolumn in Office365. I'm using the following syntax: <Field ID="{40f80a77-d528-45ae-aafe-e7b15ffa8e6a}" Name="LF_Company" DisplayName="Company" ...
0
votes
0answers
300 views

SP16 - Button click refresh page when i Use PnP-Core-JS

My webpart is for SP16. I use code from this sample and when i click button in webpart, page is refreshed. This is code for Create Item: private createItem(): void { this.updateStatus('Creating ...
0
votes
1answer
1k 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
195 views

Trying to Deploy the React Multi-page Sample

Looking at the REACT-MULTIPAGE sample, I have set up an MS Teams site to test this and created the custom poll list. I have run through the next set of steps as far as this part in the readme from ...
0
votes
1answer
256 views

Unauthorized Microsoft Graph API Add member in group

I am using Microsoft Graph API in my SPFx website. I can successfully get accessToken using ADAL.js. I can create user, get users, get groups but when i am trying to add members in group it throws ...
0
votes
1answer
576 views

SPFx - Issues loading image from imported class

I bumped into an issue when creating a SPFx app part. My objective is to have a set of HTML templates which I can swap in where certain criteria are met. These HTML templates are stored in a separate ...
0
votes
1answer
326 views

Can't upload a .sppkg add-in to the Office Store

I am trying to put an add-in on the Office Store, under the SharePoint Add-Ins section. It's a simple SPFx webpart. The file is a .sppkg (SPFx package), but the store is demanding that my add-in ...
0
votes
2answers
426 views

Sharepoint framework .sppkg webpart on-premises app cataglog issue

I am deploying hello-world app to an on premises app catalog. I am creating the app with SharePoint framework after building and running gulp package-solution. When i upload the .sppkg from SharePoint/...