Questions tagged [spfx]

General technical questions about the SharePoint Framework client-side development model.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

SPFX : Undefined Hammer while trying to load third party javascript

I have create a custom SPFX webpart and what I'm trying to do is to convert the HTML and JQuery flipbook into SPFx webpart. I've download this plugin and add all the reference. However, when it is ...
2
votes
2answers
36 views

SPFx. Error while importing modernizr in SPFx

I am new to SPFx and I am getting an error while trying to add jQuery and external JS in SPFX. Example my web-part name is FlipBookWebPart and I am trying to add turn.js and modernizr.js into the ...
1
vote
1answer
13 views

Are there any dependencies for PS.js (Project Server JSOM)?

Because I can't seem to do what I need to get done using the REST API, I am going to try to use the Project Server JSOM in an SPFx webpart. I found instructions on how to load the SharePoint JSOM ...
0
votes
0answers
10 views

SPFx web part cdnBasePath: possible to use server relative URL to make switching between environments easy?

Scenario: SP 2016 on-premises. We have set up a centralized App Catalog site, and have settled on the solution of using a document library called "AppFiles" on the App Catalog site as our "CDN" to ...
2
votes
0answers
50 views

How do I change the TypeScript version used by gulp? [duplicate]

In SharePoint Online, how do I update my typescript version? I think I narrowed down my problem to typescript versioning. My helloworld web part works. The one thing that it has that many of my other ...
0
votes
1answer
15 views

How to add `module.exports` in `gulpfile.js`? [closed]

I am trying to user the npm package react-data-export in my SPFx project. But when I try to run the sample code it gives below error. ./node_modules/tempa-xlsx/xlsx.js Module not found: Error: Can't ...
1
vote
2answers
45 views

Is possible put React JS on Sharepoint Extension?

I am new to SharePoint development, and in need to create a custom side panel (with React), when click on item of list view. Is it possible to use React JS while developing SPFx extension?
0
votes
0answers
43 views

Installing Yeoman generator fails with Node 10.18.1

This evening I thought I would update my SPFx Dev Toolchain: install latest Node 10.xx LTS (using NVM as recommended by AC or David Warner MVPs) Better Node.js Install Management with Node Version ...
0
votes
0answers
18 views

SPFx WebPart in Microsoft Teams tab AAD token error

I have a Microsoft Team's application, that is an SPFx webpart that is installed on the underlying SharePoint site. The app is surfaced on a Tab. For the last few days I am unable to authenticate ...
1
vote
0answers
21 views

Sharepoint 2016 On Prem Single sign on with Web API

We have a SharePoint 2016 on premise site which uses both the forms based authentication and windows authentication. We are planning to add SharePoint framework web parts(SPFx) to the site. For that ...
1
vote
0answers
30 views

Help w/ Executing MS Flow from an SPFX Command Extension Button

I have a manual trigger Flow setup that gets a SharePoint List, creates an HTML table of the list and formats it, then emails it to some people. I have gone through all the Microsoft documentation to ...
0
votes
1answer
34 views

Where to add an event listener when using SPFx and React

Which is the preferred place to add an event listener in your code if you're using SPFx and React? The .ts file or the .tsx file? And which function, componentDidMount, getInitialState, render? The ...
0
votes
1answer
31 views

Dynamically Pass List item parameter using pnp js

I have created SPFx web part using React JS framework. I am reading the data from the CSV file and adding item to SharePoint list using inBatch in PnP JS. I was able to add the item to SharePoint ...
0
votes
1answer
24 views

SPFX for favicon published to SharePoint 2019 server not working

I have created a SPFx framework extension to change the favicon of my SharePoint 2019 on-premise. I followed below link, everything works fine while testing. but when deployed to app catalog it doesn'...
0
votes
2answers
31 views

How can I add CommandBar buttons in SharePoint online using JSOM?

As shown in figure I want to add button (right side by send by mail) on each CommandBar in SharePoint site?
0
votes
1answer
22 views

SPFx webpart icons

Trying to use external .png icon for my web-part but the don't appear both on local workbench as well as on production SharePoint online. I have uploaded on Office 365 public CDN. All my icon size ...
3
votes
2answers
77 views

Remove spfx webpart

I've uploaded and deployed some spfx webparts through my App Catalog site. Now these webparts are not useful anymore so I've deleted them from the App Catalog. Then I've checked my sites and ...
0
votes
1answer
45 views

SharePoint Development with SharePoint Framework

We have SharePoint 2019 at workplace. I saw the documentation in MS https://docs.microsoft.com/en-us/sharepoint/dev/ about getting started with SharePoint Development. Do I have to set up a ...
0
votes
1answer
46 views

How to add bootstrap media query add in spfx(jquery) web parts?

We have SharePoint SPFx web part (developed using jQuery). We want to show these web parts responsive in the all devices. Do we need to use bootstrap or any media query?
0
votes
1answer
49 views

Using PnP.js Create() and Update() function is not working but Read() and Delete() is working

Using the below SPFx PnP.js code I am doing the CRUD operation in SharePoint online list: private _getListData(): Promise<ISPList[]> { return pnp.sp.web.lists.getByTitle("EmployeeList").items....
0
votes
0answers
30 views

Custom Drag n Drop webpart in sharepoint Edit Mode

Can anyone help me in SPFx online? I am creating a custom web-part in which I am using HTML drag and drop API in edit mode. Somehow my drag and drop functionality is working if used it in preview ...
0
votes
0answers
23 views

Customize SharePoint left menu pages by using a specify term set in Taxonomy

I have a term set called WikiPages. What I would like to do is creating a contextual menu (i.e the quick launch or left menu) for all my pages of my team site (modern experience) using Fabric-UI Nav ...
1
vote
3answers
365 views

Property 'web' does not exist on type 'SPRest'

I installed these packages: @pnp/logging @pnp/common @pnp/odata @pnp/sp npm i @pnp/logging @pnp/common @pnp/odata @pnp/sp --save and tried this: import { sp } from '@pnp/sp'; public ...
0
votes
1answer
124 views

Gulp serve error - No valid rules for TypeScript files

I received the error message below when I tried to run gulp serve on a tile web part that I got from a starter kit from https://github.com/SharePoint/sp-starter-kit/issues/131 Node version: UPDATE: ...
1
vote
2answers
37 views

PnP Carousal Control Button style and dots

I have created react carousal from pnp controls, I was looking for help to style next and previous buttons and is there any way to add dots for the slides My Carousal Code public render(): React....
0
votes
1answer
32 views

Share a folder with external use using PnP

I am trying to share a folder with an external user, I get the URL of the folder on console.log. But how can I send it directly to the user? This code shares a file with an external user, but it ...
1
vote
1answer
27 views

check user in group SPFX get Httpclient request 403

I get a 403 error when i try to check if a user is part of group. let props = this.properties; let GroupsArray: string[] = []; if (props.Groups != null && props.Groups.length > 0) { ...
0
votes
2answers
38 views

PnP SPFx Controls not rendering responsive

I have created one static web part using react carousal but it is not working as responsive. Please guide me if I am missing anything import { Carousel, CarouselButtonsDisplay, ...
0
votes
1answer
45 views

Why are the SPFx web parts NOT working in one of the three tenants?

The five web parts needed to build the Luminas SP site are having issues with the external linking or security/settings, or maybe its just the app catalog? I deployed five web parts in two separate ...
1
vote
0answers
17 views

How can I share a folder with an external user (ex test@gmail.com) with verification code using SPFx and pnpjs [closed]

I am trying to create a code with the pnpJS library which will send an email invitation with verification code to externals users.
2
votes
3answers
27 views

Get information of employee from Employee ID in Sharepoint Framework(SPFX) using REST API

I am using Sharepoint Framework(SPFX) and using Typescript for calling REST APIs. I want to get information of other employees from Office 365 or Active Directory using their Email ID or Employee ID. ...
0
votes
0answers
30 views

SPFx React Fabric UI Typography and font issue

I am creating react component where in I have created fonts folder inside src folder inside fonts folder I have created fonts.module.scss @font-face { font-family: FS Lola; src: url("/../../../....
2
votes
1answer
35 views

SPFX: How to create an <img> tag containing the photo BLOB returned by MSGraph photo/$value

I'm creating somekind of custom Who-is-Who web part. After retrieving the Users information with MSGraphClient /users API I'm trying to retrieve and display the Photo for each employee. I'm having a ...
0
votes
1answer
20 views

SPFx - Can't get alert for when a checkbox is checked for a Field Customizer

I am a complete beginner to SPFx so I am probably doing something completely wrong. I have a SharePoint list that I have managed to change one of the fields to a checkbox. I want to try to give it an ...
1
vote
2answers
34 views

Deployment options of SPFx app without tenant permissions

I used to work with Sharepoint 2013 OnProm with Content Editor webparts from where I can just embed an HTML file and some JS scripts. I'm now looking at Sharepoint Online in my organization. I'm a ...
1
vote
2answers
16 views

How get values that return sp.site.createModernTeamSite in pnpjs

Using below function: const s = await sp.site.createModernTeamSite( CustomerName, CustomerID, true, 1033, "Customer Site for " + CustomerName); You can create a team Site, but ...
1
vote
1answer
25 views

Office UI Fabric verticle align middle not working

I am trying to make my image vertically aligned in middle using CSS which is not working in Office UI Fabric. My HTML Code: <div class="ms-Grid" dir="ltr"> <div class="ms-Grid-row"> ...
0
votes
1answer
38 views

SPFX Custom CSS and deploy in CDN

I am creating SPFx extension with custom CSS file not SCSS file. My Question is how can I add path in SPComponentLoader.loadCss()? And at the same time how can I upload the file in my "Public Office ...
0
votes
0answers
25 views

SPFx event to fire when layout is changed

I have created a web-part in SPFx. I am trying to run some code when the layout is changed from single column to double column layout. this.domElement.getBoundingClientRect().width; I tried this ...
0
votes
1answer
44 views

SharePoint Framework with Promise in extension

I am trying to render header placeholder, but I am very new to the promise of SPFx. Below line in my code runs before it returns any value. How can I await until it returns a string value? this....
2
votes
0answers
26 views

SPFx Command Bar not working after deployment

I am working on SPFx Command Bar and everything is working as expected when I do 'gulp serve' and run it in localhost. But when I tried to deploy the same in AppCatalog and installed the same to my ...
3
votes
2answers
97 views

SPFX web part, CSS is leaking into the whole sharepoint site

I am creating a web part, and I wanted to use the Materialize CSS library so I didn't have to write much CSS. However I have noticed the CSS is spilling out onto the whole SharePoint page and not ...
0
votes
1answer
16 views

How can create a ListView Command with SPFx dynamically for several lists

I have created a listview Command for a specific list, "pageUrl": "https://contoso.sharepoint.com/sites/mySite/Lists/ListCommand/AllItems.aspx". It works fine, but is it possible to create it ...
1
vote
1answer
57 views

How to fix error cannot find module @microsoft/sp-build-web.When trying the sp-dev-ebpart samples

I have been trying to build the https://github.com/SharePoint/sp-dev-fx-webparts I have gone through the instructions and reinstalled and installed but no luck I am now getting the error: Cannot ...
2
votes
0answers
28 views

Get Teams presence in SPFx

is there please any way in SPFx how to get people's presence from Teams? I know how to get presence from Skype for Bussines but I struggle to find anything about Teams presence. Thank you
0
votes
1answer
27 views

Load Terms - typescript error - spfx term store taxonomy

I am trying to retrieve all the terms for a term-set in my term store to be used in an SPFx web part. Following the guide given here. // get terms merged with data from a term set const terms4: (...
0
votes
1answer
15 views

App Catalog site for SPFx Webparts only - do we have to set up the shadow app domain?

As a follow up question to this question: So given that we can't use site collection App Catalogs in SP 2016 on-premises, and we must use a centralized farm-wide App Catalog site, a lot of the ...
0
votes
1answer
17 views

How do you enable/configure a site collection app catalog in SP 2016 on-premises?

After extensive searching, I can't seem to be able to find any information online regarding how to set up a site collection app catalog on SP 2016 on-premises. All the guides are for SP Online / O365. ...
0
votes
0answers
9 views

CorrelationId error when approving pending approvals in API management

I have created an Azure AD secured API with azure function, and trying to call it from SPFx solution. I have uploaded the solution to app catalog, but when I go to API management under SharePoint ...
0
votes
1answer
41 views

How to setup the environment for the sample sp-dev-fx-webparts - client-side web part samples

I have installed git and cloned the below https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples Installed node and NPM for windows.Ran npm install for just one specific folder (react-...