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
2answers
20 views

I am using pnp peoplepicker in spfx and I want to clear the selected value by user on this people picker by code

Here is the people picker I am using within my component's Render: <PeoplePicker context={this.props.context} titleText="" personSelectionLimit={1} groupName={""} showtooltip={true} selectedItems=...
0
votes
0answers
16 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
52 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
0answers
7 views

SharePoint 2016 SSO with Custom Web API

I am trying to Build SSO between SharePoint 2016 On Premise site and Custom Web API which is hosted in On Premise IIS. I tired to build a Provider Hosted Add In to achieve this. But It seems not ...
0
votes
0answers
45 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
1answer
23 views

Show survey questions only in webpart of home page

i want to show survey questions only to end users without default view of survey list in home page of sharepoint site . and after user finished survey , it disabled or want to handle error message of ...
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
48 views

SPFx React webpart onAfterPropertyPaneChangesApplied

I have created simple web-part in react and spfx for sharepoint online. In this web-part weather.tsx have all rendering and function of the web-part. In componentDidMount function I call external API ...
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
52 views

SPFx web part does not show/load in SharePoint online “_layouts/15/workbench.aspx” page in the internet explorer browser

I have developed a SPFx web part for SharePoint online, while running the gulp serve command, this is loading in the local workbench (http://localhost:4321/temp/workbench.html), as we can see in the ...
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
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 ...
1
vote
1answer
24 views

How get team site groupId property from a SPFX webpart with pnp/js

I create a webpart with SPFX and it is deployed in a team site. I need get the team site groupId property.
0
votes
2answers
126 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....
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
47 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 ...
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 ...
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
0answers
12 views

how get client via aadhttpclientfactory?

I have a webpart that should be authorized via aad to have access to an API that is embedded outside (api is not on azure), this api is registered in aad as an application, but at the moment I do not ...
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 ...
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 ...
1
vote
1answer
38 views

Grant permissions to all external users on Client Side Assets library in App Catalog site

I have a SPFx web part added to my page in a modern SharePoint site. External Sharing is enabled in my modern site and I need to grant at least "Read" permissions to every external user on "Client ...
0
votes
1answer
26 views

SPFx - List out all labels within a Term Set (Term store)

Inside a SPFx web part, I have been trying really hard to list out the labels (red, blue, green) within the Favourite term set. I have not yet been able to achieve this. Does anybody know how to do ...
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
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-...
0
votes
2answers
57 views

The Framework Tiles from SP-Starter-Kit is not working

I pulled the tiles out of the starter kit here, https://github.com/eoverfield/sp-starter-kit. I get NO errors when I do npm install and run gulp serve. Everything works fine locally, but when I ...
0
votes
0answers
19 views

PnP SPFx generator - Angular Elements and live change

I have been doing some tests with the Angular Element SharePoint Online Web Part project template generated by the @pnp/generator-spfx Yeoman generator (see here) to evaluate its usage for a small ...
0
votes
0answers
16 views

Can I create a “repeater” field in the properties pane similar to the image gallery webpart?

I need to make a webpart very similar to the image gallery webpart but where the webpart itself has a set of properties in the property pane and then each selected image also has a set of properties - ...
2
votes
1answer
50 views

Use CKEditor in SharePoint spfx solution with React

We are trying to set up and use CKEditor5 with React in a SharePoint spfx solution (of course also React), but we are struggling with making it work as we would like. The Classic build of CKEditor5 ...
0
votes
1answer
57 views

SPFx webpart component set default color

I have created a tiles webpart where i am changing the color on toggle between tiles but i want to set default color for one of tiles once page load and then user can toggle ...
0
votes
1answer
17 views

Enabling Multilingual/Localization in SharePoint Framework Client Side Webparts

How to do Multilingual/Localization support in SharePoint Framework Client Side Webparts?
0
votes
1answer
37 views

Accordion in SPFX using SharePoint list [closed]

How to create an accordion SPFX webpart using SharePoint list as backend?
1
vote
0answers
22 views

How do you delete tasks from Project Server via REST?

TL;DR - it appears to be impossible to delete tasks from Project Server using the REST API. Please, someone suggest something to me, because this is excruciatingly frustrating. I'm trying to delete ...
0
votes
0answers
6 views

What is returned when deleting tasks from Project Server using REST? 'Unexpected end of JSON input' from HttpClientResponse.json()

I'm working on an SPFx webpart to do some interactions with Project Server. As part of this, I need to delete some tasks. I have a function that deletes tasks using HttpClient.fetch() with a DELETE ...
0
votes
1answer
44 views

SPFX REACT WebPart file upload works in Workbench but not if it is deployed to SPO

I'm developed a react webpart and try uploading a file to a Libraby. While i test it in the Workbensh it works perfectly. After deploying the webpart to SPO, it fails. the setup of sp: sp.setup({ ...
0
votes
0answers
18 views

How to retrieve all items across all sites under a hub?

I am building a SPFX web part (React) where I need to retrieve every item in every list in every site under the Hub site/site collection. Can anybody point me in the right direction to accomplish ...
0
votes
3answers
65 views

Add Css in spfx

I want to add below CSS in SPFx web-part using states. But unable to do it: div[class^='pageTitle_'] { display: none; }
1
vote
0answers
26 views

SPFX : TypeError: external__react_.useContext is not a function

I am using office-ui-fabric card in my spfx web part. Getting the error as below. createComponent.tsx:51 Uncaught TypeError: external__react_.useContext is not a function at result (...
0
votes
0answers
9 views

Are there typings for the SharePoint and MS Project JSON objects you get from the REST APIs?

I'm working on an SPFx webpart that is going to interact with Project Server, and I'm finding myself setting up things like this: export interface ISelectProjectModalProps { allProjects: any[]; ...
0
votes
2answers
504 views

SPFX webpart creation Error: ReferenceError: primordials is not defined

I am creating SPFX webpart. Without doing any code changes i am executing gulp serve. I am getting below error for this. What could be the issue? GULP version: CLI version: 2.2.0 Local version: 4.0....
0
votes
2answers
60 views

SharePoint framework yo not showing all the options

I am new to SharePoint framework. I am executing yo @microsoft\sharepoint. Providing all the inputs. For the question Which type of component to be created? it is showing only Webpart. It is not ...
0
votes
1answer
74 views

Change default port for gulp serve

I am very new to spfx development. I working with two different spfx webparts and I wanted to run both of them at the same time but it run both on 4321 default port. I try to change port in serve....