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
1answer
784 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
1answer
14 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
35 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
3answers
2k 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
12 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 ...
5
votes
1answer
714 views

SPFx web part not showing from the catalog

Followed the video from SharePoint Framework development with SharePoint 2016 Feature Pack 2 but could not add the web part to the site because it did not show up. I made sure I have only SPFx 1.0....
0
votes
0answers
12 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 - ...
1
vote
2answers
595 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 ...
2
votes
1answer
21 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
8 views

Enabling Multilingual/Localization in SharePoint Framework Client Side Webparts

How to do Multilingual/Localization support in SharePoint Framework Client Side Webparts?
1
vote
0answers
15 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
3answers
411 views

SPFX open new list item using modal dialog

The code below opens a new item in Iframe/modal dialog. But when the user saves or closes the modal form i would like it to be closed and not redirected to any other page. Is there any way I can ...
6
votes
2answers
5k views

workbench page shows “This site can’t provide a secure connection” on creating SPFx Webpart

I am new to SPFx, tried to create simple webpart using SPFx. Referred from here. Followed these steps: -Installed nodejs -Installed gulp & yomen using npm install -g yo gulp in powershell. -...
0
votes
1answer
43 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
29 views

Accordion in SPFX using SharePoint list [closed]

How to create an accordion SPFX webpart using SharePoint list as backend?
0
votes
0answers
5 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
38 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
2answers
177 views

Client Side (inline IDE) editor/app for editing (.js , .json, .css, .html) files in a Document Library

We more and more store data as .json files in a Document Library. Instead of (re)writing our configuration front-end, I would like users to edit the bare .json files. (and while we're at it, all ...
0
votes
3answers
62 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; }
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
2answers
39 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
170 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....
4
votes
2answers
1k views

SharePoint Framework: How to let modern web parts interact with each other?

How can web parts know of and interact with each other within the SharePoint Framework? Here's an example. Let's say we need: a search box web part search result web part a filter web part All ...
0
votes
1answer
64 views

NPM packages for React webpart SharePoint Online try to access 'fs' on client side but it's not even necessary? React SPFX

While there is a correct answer already given at: SPFx Unable to use 'fs' module its missing the part that in webpack config it can be outflagged like this: node: { fs: 'empty' }, Module ...
1
vote
0answers
21 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 (...
1
vote
2answers
1k 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 ...
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
1answer
37 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....
0
votes
1answer
43 views

Adding same webpart with different configuration, multiple times on the same page [closed]

I have created a SPFX webpart, so when I add this webpart multiple time on the same page then same data appears on both webparts even if they have different property pane configuration. The property ...
0
votes
2answers
23 views

How do you get to the inner error of a SPHttpClientResponse that's not OK/200?

I'm trying to do some error handling in an SPFx web part, and I can't seem to get to the inner error message of a response that's not what I'm expecting. In the following code snippet, I've ...
0
votes
1answer
688 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
0answers
19 views

Spfx Web Part - API call sometimes fails to execute

I have a custom web part that uses aadHttpClientFactory to authenticate with AAD and then get data from an API secured with AAD. It works flawlessly most of the time. Periodically, though, it gets ...
1
vote
1answer
74 views

Title Area modern ui pages does not load

I have two modern UI pages Test1 and Test2. In Test1 page, I am using SPFx webpart to hide control on particular pages. I am using CSS: global { div[class^='pageTitle_'] { display:none; ...
1
vote
1answer
753 views

Open modern image file dialog in SPFx web part

By using the "Quick links" client-side web part on a modern site page it is possible to add a new link and set an optional image by a file dialog. Is it possible to use this kind of file dialog in ...
0
votes
1answer
27 views

gulp serve error

When run gulp serve I am getting below error I am using below packages I found on internet that if you are using node 12 and gulp 3 then it will have above issue but I am having node 12 and gulp 4, ...
1
vote
1answer
24 views

Where is HttpClient and related classes in SPFx 1.1?

I am finally able to get started using SPFx. Stuck on 2016 / SPFx 1.1. The documentation for the HttpClient class says it's in the @microsoft/sp-http package. However, the Yeoman generator did not ...
3
votes
2answers
1k 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
2answers
1k 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
20 views

Custom web part broken once deployed

I have a custom web part I created that works in the local workbench and the hosted workbench both but just shows "An unexpected error occurred" after I deploy it to my site. In the console, I get a ...
0
votes
0answers
64 views

How to jump specific page using pnp js for sharepoint pagination

I am using pnp js Get Paged Items for pagination in my SPFx webpart. sp.web.lists.getByTitle("MyCustomList").items.top(10).getPaged(); Suppose I have 150 data in a list. I set 10 data for a page. So ...
0
votes
1answer
45 views

Get current theme colors for SharePoint Online site in SPFx webpart

I have a SharePoint Online site with green theme color currently set. In my SPFx webpart I want to be able to get the current theme color (primary, secondary and tertiary) in TypeScript code. Below ...
0
votes
1answer
20 views

Custom Web part is not displaying to add in site Contents

I created a new basic webpart, and deployed it into the SharePoint online app catalog. After that, I tried to add it to the site contents of one SharePoint site. But webpart is not visible under "From ...
3
votes
2answers
1k 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
2answers
20 views

Sharepoint Online - Upload Web Part Site AppCatalog - Deploy Error

I have a simple web-part Hello Word from the tutorial of "Build your first web part" from Microsoft. However, every time I upload web part, the column "Deployed" is checked to "No", but column "Tenant ...
0
votes
0answers
42 views

Depolying SPFX Web Part on On Prem 2019

I used the example from the Microsoft site. I used the 2019 and Online option and added nothing extra to the project. I packaged and published the web part. I was able to deploy it to our companies ...
1
vote
1answer
16 views

Unable to approve API permissions from API Management page

I created a custom web part that calls a web API I created. When I deployed the web part, I went to approve the required permissions and received the following errors: [HTTP]:500 - [CorrelationId]:...
0
votes
0answers
19 views

Search two different search boxes of List columns related data show on grid view based on text enter in SPFX?

Am able to search the PR_Number column data, the same i want to search for Description as input in another search box and show the gridview in SPFx. import * as React from 'react'; import * as ...
0
votes
1answer
30 views

Properties how pass them array value

I want to ask how pass a array value to the properties. Always at first should be 'properties name', but I have got a lot repetable names. So I want give them to the Array. How I can pass them ? If I ...
0
votes
1answer
2k 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
0answers
24 views

SPFx Document Web Part Deprecated?

I am trying to extend the functionality of the Documents web part I have been trying to gulp serve this: Documents Web Part. But it is over 2 year old and localhost refuses to work (ERR_SSL_PROTOCOL)...