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
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 - ...
1
vote
2answers
636 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
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
17 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
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
3answers
623 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 ...
7
votes
2answers
6k 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
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
37 views

Accordion in SPFX using SharePoint list [closed]

How to create an accordion SPFX webpart using SharePoint list as backend?
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
2answers
179 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
66 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
61 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 ...
4
votes
2answers
2k 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
109 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
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 (...
1
vote
2answers
2k 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
75 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
50 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
38 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
730 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
32 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
76 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
781 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
29 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
32 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
25 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
92 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
113 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
22 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
65 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
19 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
21 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
44 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
26 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)...
2
votes
2answers
1k views

How to make a POST call to Microsoft Graph in SPFx (using MSGraphClient)?

I have difficulties to find code samples of POST calls, using the MSGraphClient. The only one I find is using the already deprecated graphHTTPClient ( https://docs.microsoft.com/en-us/sharepoint/dev/...
0
votes
1answer
64 views

Get User Photo, Name &Title of an office 365 group using SPfx

I am trying get the user details i.e. UserName, Title and Profile picture of users that belong to a office 365 distribution group. I tried this code sample, but I get an undefined error: ...
0
votes
0answers
68 views

SPFX and react-dnd

I promised myself never to write a StackExchange post with lots of code. But here we go. I am basically trying to get some basic drag-and-drop behavior working in an SPFX (1.9.1) web-part using ...
4
votes
1answer
973 views

Using ADAL with SharePoint Framework

I've setup a web part with SharePoint framework that requires access to the Microsoft Graph for displaying the recently used files. I've followed the instruction here: https://github.com/SharePoint/...
0
votes
0answers
13 views

SCSS in Sharepoint Framework Library Project

Looking for the proper way of constructing my projects. I decided to use one project per web part however is have a number of classes and react components that are common to all projects. So I ...
0
votes
0answers
22 views

SharePoint App - SPFX Webpart - Access list on site to which user does not have access

I am working in SharePoint Online. I am trying to make a SharePoint SPFX webpart that : Will be added to a modern page in some site collection, let's call it SiteA Will read the contents of a ...
0
votes
2answers
26 views

Variable for theme text color

I have a custom web part that I want to have styled correctly no matter what color theme is installed on the site. I have this working correctly for my button background colors like this: .myButtons {...