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.

7
votes
2answers
758 views

Using MS Graph from SharePoint Framework 1.5.1 / 1.6

Can someone, please help me with figuring out how to use MSGraphClient from the latest SPFx version? MSGraphClient is supposed to help us to use MS Graph. My problem is that as soon as I add the line ...
1
vote
2answers
177 views

spfx MSGraphClient

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, ...
3
votes
1answer
91 views

SPFx Developement Environment Setup issue

I am facing critical issue in setting up development environment for SPFx. I have refereed following link Link: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-...
0
votes
0answers
101 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 ...
2
votes
0answers
59 views

TypeScript and SharePoint Framework question - although works but does it represent correct design?

Thanks for reading my question. I am just beginning to learn TypeScript and from my understanding so far I have created the follow code to retrieve list items from a list. The code works but I am not ...
1
vote
1answer
79 views

Create document from template in javascript on a modern sharepoint site

Does anyone know of an equivalent to the createNewDocumentWithProgID() or createNewDocumentWithRedirect2() JavaScript function that will work on a modern spfx SharePoint site?
3
votes
2answers
624 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....
7
votes
0answers
136 views

How do I retrieve the SharePoint Modern site's classification property via search REST APIs?

I am creating a rollup of Modern team and communication sites that are provisioned in my tenant by creating one SPFx webpart which retrieves the site's title, URL, logo and some other properties using ...
0
votes
0answers
141 views

Jquery Datatable rendering issues in SPFx webpart

There is compile time error when rendering jquery DataTable in spfx webpart. Please see below issue. ($.fn.dataTable.render) is showing below error Property 'dataTable' does not exist on type JQuery&...
1
vote
1answer
137 views

How to sort a sharepoint list according to average rating column in react js?

I have a list which is to be sorted accoring to the average rating column and the top 3 items is to be displayed in react js. This is the api endpoint used : ${this.props.siteurl}/_api/web/lists/...
2
votes
1answer
502 views

How to deploy SPFx web parts on SP 2016 on prem?

I am working on a development environment on SP 2016 on prem with feature pack 2. I have created a "Hello world" web part following this example. I am trying to deploy the SPFx web part to a classic ...
1
vote
1answer
96 views

Reuse Child Component Method to Parent Component Fabric React - SPFx

I am using Fabric React with SPFx. I want to use one component public method to another component. How can be possible to reuse method? My Parent Component: export class PanelSmallRightExample2 ...
3
votes
1answer
217 views

How to inject jquery sharepoint services to spfx

We are trying to inject jquery sharepoint services dependency to our sharepoint framework webpart. This is what we did. First added external files at config.json "externals": { "jQuery": { //"...
1
vote
1answer
28 views

“Converting” project from old to new technology?

I am working on a SharePoint project which started a couple of years ago. It started with SP 2013 on - prem, and we are now on SP 2016 with feature pack 2. In the project we used the Powershell based ...
3
votes
2answers
1k views

How to customize width and hieght of Dialog component of Office UI fabric in SPFX webparts

I need a Office UI fabric dialog component of 600 by 600 px in SPFX webpart. Tried className and containerClassName attributes both didn't work. The style attribute doesn't. The max-width is set to ...
1
vote
0answers
74 views

How to use jquery.slimscroll in spfx

I want to use slimscroll for a couple of SPFX webparts but having trouble to get things going. I used: npm i jquery-slimscroll npm i @types/jquery.slimscroll next to a couple of other modules (...
1
vote
1answer
98 views

Office UI Fabric Ract Command Giving an error UNMET PEER DEPENDENCY

Issue while adding command "npm --save install office-ui-fabric-react" NPM Version: @microsoft/generator-sharepoint@1.0.2 gulp@3.9.1 yo@2.0.2 How to solve this issue? It gives warning:office-ui-...
0
votes
1answer
312 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? [
3
votes
1answer
257 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 ...
0
votes
1answer
62 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
71 views

Add JS To SPFX Extension

We have added js to modern pages using SPFX extension using below link: http://www.sharepointnutsandbolts.com/2017/06/SPFx-Application-Customizer-Global-JS-Page-Header.html However, our js is ...
1
vote
1answer
163 views

SharePoint 2016 SPFx React TypeScript Issue

I am getting an error of TypeScript 2.2.2 in SharePoint 2016. I can install SPFx web part with No JavaScript Framework approach. And it's working fine but when I choose "React" in "yo @microsoft/...
1
vote
1answer
207 views

Cascading dropdown list in SPFx web part

Can someone help me with this issue as I would like to create cascading dropdown lists inside the web part itself and not in the property pane. I have found this code in [github react-...
0
votes
0answers
175 views

Spfx webpart on Classic pages with custom master page not working

I have an angular 1.x webpart application which is built using the spfx 1.4 version. The webpart works in the modern sites pages but is not working on the classic site pages with custom master page. ...
1
vote
1answer
235 views

How to open property pane in a SPFx webpart without going in edit mode?

Is there a way to open the property pane without going into edit mode?
0
votes
0answers
303 views

Advanced SPFx Search box web part

I have found a spfx search box in github, but I was wondering if there is one that has advanced functionality, like searching for specific sites, libraries, by content type? Is it possible to use ...
1
vote
3answers
170 views

ts Cannot find the module

I am very new to the SPFx I just started. I was making my first web part in Visual Studio Code but I was having some difficulty in my code. May be somebody can help. I have scss module in the same ...
1
vote
1answer
214 views

SPFx v1.5 building Extension and WebPart as single solution

I recently updated my SPFx framework to v1.5.0 and I wanted to create a solution that has both Extensions (Application Customizer) and Client Side Webparts. Now if I try creating a WebPart first and ...
0
votes
1answer
253 views

Where is the “Service Principal Permissions Management Page”?

I'm prototyping a new web part using MSGraphClient and the new webApiPermissionRequests section in the package-solution.json. When deploying the SharePoint Framework Client Side solution to the app ...
1
vote
1answer
110 views

How to find a list or log of all site collections with SPFX extension deployed?

We deployed a spfx extension (Add-PnPCustomAction Location "ClientSideExtension.ApplicationCustomizer" ) to multiple site collections manually, is there a way to use powershell to pull extensions and ...
0
votes
1answer
247 views

Retrieve & Display 'Person or Group' type column in a List using SPFX

I am trying to Get data from a Custom List & show it as a table using SPFX. By Refering this Link, displayed Single line of text type columns. But when trying to display Person or Group, ...
1
vote
1answer
144 views

SPFx get all sites were user has permissions

is there a way to get all site collections and subsites where the current user has access to? I would like to build a web part in SPFx and in React. Any suggestions are welcome. Thank you.
0
votes
0answers
62 views

I need to call the out of the box web parts inside the custom web part created using SharePoint framework

I have a web part created using SPFX now i need to call the existing SharePoint OOTB web part inside the custom web part.Is it possible to achieve this?
2
votes
1answer
175 views

How to add items to SPO list synchronously in spfx webparts?

I have twelve items that need to be added to a list on button click. I am using the sp-pnp-js library to add items. But the function adds items to the list asynchronously. I have tried many ways. ...
0
votes
1answer
47 views

SharePoint Framework without command line

Is it possible to build SharePoint Framework Web Parts without using NodeJS, Yeoman, gulp?
0
votes
0answers
561 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
170 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
1answer
375 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
1answer
289 views

Is it possible to open modern item edit form panel from custom SPFx webpart?

Is it possible to open EditForm panel from my SPFx webpart? Something like in list view, if an item is selected, side panel appears with read-only properties and a button "edit all" enables user to ...
3
votes
2answers
213 views

Load SPFX webparts only after application customizer init method is completed ?

I have some webparts who have dependency of data which is obtained from application customizer. Is it possible to load webparts after application customizer
0
votes
0answers
54 views

SPFx on a Team Site Homepage Cannot Get Taxonomy Data

I have an SPFx webpart and an SPFx extensions that getting data from Taxonomy Term Store. Both of them are working well on all pages (Site Content page, Library page, Site page, etc.) except on a ...
2
votes
0answers
153 views

Webpart built using latest spfx version not working on the classic site

I have built an angular 1.x webpart application using the spfx 1.4 version. The webpart works in the modern sites pages but is not working on the classic site pages and I am getting the following ...
1
vote
1answer
313 views

How to access properties that I have created dynamically?

In the thinking of rebuilding Highlighted content properties, I have created button that add fields in the property pane but now I would like to know how to store the value of these fields and how to ...
0
votes
1answer
84 views

Return only one item from the list

I'm trying to display checkbox of some of the popular links but I face this problem. I can't return more than one item (first one). Any Ideas how to display all of them (5). private getItems(){ ...
1
vote
1answer
340 views

500 Internal Server Error Search REST API

I am trying to call search REST apis from an spfx webpart, but I am getting this: GET http://servername/_api/search/query?querytext=%27*%27 My code looks like this: let query = `${this.context....
1
vote
0answers
456 views

Using SP-PNP-JS to get data from custom content type fields with React

I'm currently making News Listing Web Part, where News are made as custom content type. I managed to get the basic fields like id, title, but others are really bothering me. The API fetches all the ...
1
vote
1answer
464 views

how to save user to people and group field using SPFx?

I am using react people picker from github and I would like to save the users to a sharepoint list. Can someone help with this issue? How do I save the users in a field called Persons? 'Persons' : ${...
1
vote
2answers
720 views

How can I use a Property Pane Button to dynamically add or delete fields in the property pane?

I'm currently working on my own webpart and I'm looking for a way to dynamically add or delete fields in the property pane exactly as it is in the highlighted content webpart. I don't even know how to ...
0
votes
2answers
672 views

Spfx, WebParts and PnP : How to get the current user id?

Good morning every SharePoint fellow ! I know this question has surely already been posted, but i could'n't found a clear answer. Context I am programming a custom WebPart for Sharepoint online with ...
0
votes
1answer
240 views

ReactJS web part list items with delete button, delete executes when rendering

I am using SPFX to render items from a list in a table that includes a delete button for each row item. Here is a condensed version of the parent component: export interface IHelloWorldState { ...