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.

0
votes
0answers
26 views

Adding an Spfx client side webpart on a classic page

I am on SharePount on-premise 2016 with "September 2017 Public Update for SharePoint 2016" deployed and the configuration database is greater than 16.0.4588.1000. The site is running on https I ...
1
vote
0answers
10 views

SPFX Webpart- “Error initializing application” after refreshing page

SPFX app is created and deployed tenant level. IF it is add to a page at site collection level (ex:https://text.sharepoint.com/sites/ABC) it is working perfectly. If it is added at subsite level (ex:...
0
votes
2answers
754 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 ...
1
vote
2answers
31 views

Error after installing the SPFx environment for the first time

Got a following error after installing the SPFx environment for the first time any help would be helpful. Thanks in Advance.
-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 ...
1
vote
2answers
37 views

Get current user's user group in SPFx WebPart

How do I get the current user's groups which he is a part of without @pnp/sp js framework in SPFx ?
1
vote
1answer
363 views

Cannot find module '@microsoft/gulp-core-build-serve'

I am getting following stack trace while executing gulp package-solution. I can't create package due to this error. >gulp package-solution { Error: Cannot find module '@microsoft/gulp-core-build-...
0
votes
1answer
11 views

Add column names dynamically to `select` method in SP PnP JS

In the select method of SP PnP JS how can I add column names dynamically? For e.g. can the below code sp.web.lists.getByTitle("My List").items.select("Col1", "Col2"); be written something like this ...
3
votes
1answer
30 views

Creating component in SPFx webpart from command line

Is there any way to generate component in React from command line (similar to Angular's ng generate)?
0
votes
0answers
11 views

How to doCRUD Operations using React and PnP-JS Core on sharepoint lists with SharePoint FrameWork (SharePoint 2016) [closed]

I would like to create a webpart(Form) where user can feed the input and those data i have to save it in sharepoint list. I want to perform CRUD operation using React Framework with pnp.js in ...
1
vote
2answers
627 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
vote
0answers
13 views

“Likescount” and “CommentCount” returns null from publishing pages

I have a search function that connects to "LikesCount" and "CommentCount"properties (social bar). Example: let localQuery = SearchQueryBuilder.create('', {TrimDuplicates: false}) ...
2
votes
1answer
602 views

how to use react-bootstrap in SPFx webpart

installing react-bootstrap straightforward; "npm install react-bootstrap --save" and "npm install @types/react-bootstrap --save" then add references import FooButton from 'react-bootstrap/...
1
vote
1answer
85 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 ...
0
votes
0answers
8 views

Best practice to provision assets (e.g. custom lists) alongside a SPFx tenant-wide Web Part?

Microsoft says that it's not possible to provision assets with a Web Part which is deployed tenant-wide (See here) But I need to develop a Web Part which will be available on the SharePoint Online ...
2
votes
0answers
49 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 ...
0
votes
1answer
22 views

Looking for a web part (default)

So I have a web part on a site and I want to know where it is from. To me, it seems to be one of the default one, although I havent been able to find it. It works like a header/title with title, ...
3
votes
1answer
400 views

SPFX and react-router

I'm having trouble getting react-router working on my SharePoint Web Part with React and TypeScript. I have tried react-router as a standalone webapp and it works fine. Just can't get it working on ...
3
votes
1answer
2k views

VS Code : Breakpoint ignored because generated code not found (source map problem?)

I am trying to debug my SharePoint Framework web part in VS code using the Chrome Debugger extension but I am getting error message as Breakpoint ignored because generated code not found. Also in ...
0
votes
1answer
26 views

SharePoint SPFx webpart - gulp trust-dev-cert Error

i try to create a webpart using SPFX: after running successfully : yo @microsoft/sharepoint Gulp version: gulp -v CLI version 2.1.0 Local version 3.9.1 node version: v10.15.3 i run : gulp ...
0
votes
1answer
36 views

Missing SPFX webpart on SP2016 subsites

Missing web part from the add a web part group on sub site pages. I deployed web part to the app catalog and CDN. I’m able to use it on the top level of my website without any issues, but I can’t get ...
0
votes
1answer
661 views

Angular 2 Routing in SharePoint Framework - SPFX

Using Angular.IO site's Routing example , I created a simple SPFX webpart with two components Dashboard and HeroDetails. When I try to run it through SharePoint site I see following error. Attaching ...
0
votes
0answers
24 views

SPFx extension samples not showing

I've tried several samples SPFx extensions. All samples have the same outcome when it comes to testing (gulp serve) after following the instructions on the samples page. Most of them just require ...
0
votes
1answer
36 views

While creating SPFx webpart solution, i am getting the error : EINTEGRITY?

All these packages like Node, NPM, Yomen, Gulp, microsoft/Sharepoint-generator are already installed as mentioned in the help document for creating a new SPFx solution. https://www.sharepointsky.com/...
0
votes
1answer
423 views

SPFx Unable to use 'fs' module

I am creating a SPFx web part which is using fs module, but getting error Error: Can't resolve 'fs'. I know this issue causing from typescript because of missing typings. Following is the exact error ...
0
votes
1answer
469 views

I have deployed my clientside webpart solution, but I can’t add it to my site

I created a sharepoint framework webpart and uploaded it to the app catalog. I enabled it for users to be able to add to sites. However, it’s not showing up in gallery when I choose to add an app. Is ...
3
votes
1answer
719 views

Display a SPFx web part within a popup on a modern page

I am looking for a way to display an SPFx web part within a pop-window in a way, similar to using the modal window ( as descrbed here: https://www.ericgregorich.com/blog/2013/12/30/open-a-page-in-a-...
0
votes
1answer
21 views

Is it possible to submit/put or publish Share Point Modern Apps (SPFx) web parts in the Microsoft Store?

Is it possible to submit/put or publish Share Point Modern Apps (SPFx) web parts in the Microsoft Store ? The solution package (.sppkg) build with SharePoint framework . What is the Microsoft ...
1
vote
1answer
97 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 ...
2
votes
1answer
78 views

How to display the SharePoint “Live Persona Card”?

In our SharePoint Framework web parts we want to show people information just like SharePoint does: When hovering over the name or image of somebody a popup like this should open. Looking at the ...
0
votes
1answer
34 views

SharePoint Framework: How to build overlapping web parts?

We have two web parts which are supposed to be used together. One can be placed above the other. The upper web part allows a drop down to be opened. The problem: this drop down opens under the lower ...
0
votes
1answer
25 views

How to load mutiple SPFx webparts in single page simultaneously

We have a home page where it contains 6-7 SPFx webparts built with 'No JavaScript Framework'. We need to load all the components in the Home page simultaneously since now it is loading One by One ...
0
votes
0answers
19 views

Connect custom web part to a library web part

I'm creating a custom web part using SPFx and I'll to connect it to a list. The web part I make shows the details of a product. The library I'll connect contains all manuals of the all the products. I'...
1
vote
1answer
46 views

SPFx webpart with Bing Maps

I have SharePoint 2019, and I am trying to create a webpart that will display Bing Map, I tried this on a react app created using create-react-app, and it works fine. Then I took the code, and added ...
0
votes
1answer
45 views

SharePoint framework unit testing pnp

How can I test with jest a pnp function? How can I mock the webpart context and pnp responses? I'm using spfx webpart, pnp-js-core and jest for unit testing Thanks.
1
vote
1answer
146 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 ...
1
vote
0answers
38 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
849 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
15 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
44 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
34 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
33 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
1k 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
76 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
28 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
16 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
427 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
814 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
33 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.