Questions tagged [spfx]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
15 views

Can't run “gulp trust-dev-cert”. Error “cannot read ”tostring“ of null”

I am trying to build up a react web part for SharePoint, and I was following the instructions from Microsoft page : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-...
0
votes
0answers
6 views

Audience Targeting

A short Breakup what I wanna do in Spfx. My goal is it to provide a custom-designed Sharepoint site based on the Users group. The first step would be to hide all Webparts on the Side and then to ...
0
votes
1answer
15 views

Can I change webpack version in spfx's build tools?

So I'm working with spfx v1.8.2 and I cannot find any options or documentation even to solutions how upgrade or override webpack used by that build tools. Is there a possibility to do that without ...
0
votes
1answer
22 views

SPFx web part throwing error in SP2019

I have created spfx solution by selecting option which will work in SP Online and SP 2019. I have tested this in SP Online which is working fine. Now I have moved this .sppkg file to SP 2019 app ...
1
vote
1answer
23 views

Error when compiling after importing into my solution the sp-page-context npm package

I am getting this error when I import the sp-page-context into my angular solution: ERROR in ./node_modules/@microsoft/sp-core-library/lib/SPCoreLibraryStrings.resx.js Module not found: Error: ...
1
vote
0answers
21 views

Custom Audience Targeting

I'm doing some research on how to create a custom solution for audience Targeting since there is no build-in support yet. Do anyone have some ideas on how to achieve that? I have already some ideas, ...
1
vote
2answers
31 views

SPFX rest call response seen in network tab but I cant read it on console

I got an issue I'm doing a rest call to get columns of a list, the call success because I can see the response in the network tab of the developer tools, here is a picture: for some reason when I try ...
0
votes
0answers
20 views

SPFx packages are referencing older versions

I have created a new solution with option SharePoint 2016 onwards, including 2019 and SharePoint online. Then I have added a web part and did the gulp serve. I got below error: Now I checked the ...
0
votes
0answers
18 views

Excessive Vulnerability Count in Yeoman SharePoint Generator

When I run yo @microsoft/sharepoint and pick standard options for a SharePoint Online WebPart with No JavaScript framework, NPM shows 1956 vulnerabilities with 140 of them being high priority. I ...
3
votes
2answers
148 views

Calling external API in SharePoint framework

I am trying to call the dummy API from SPFX, but I am getting an error, Failed to fetch, this.context.httpClient .get("http://dummy.restapiexample.com/api/v1/employees", HttpClient.configurations....
0
votes
1answer
21 views

Get Azure Blob data(Blob Container) and store in SharePoint online List/ Library using Azure function API [closed]

I Have a requirement which get Storage account Blob data and store in to SharePoint online Library/List using Function API, Is this possible ? if possible then how? or is there any other approach ...
0
votes
1answer
39 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 ...
1
vote
1answer
56 views

SPFX - React JS : How to handle an empty list

SPFX-ReactJS newbie here. Wondering how I should handle an empty list. I am trying to connect my web part to a list and simply display them on my web part and automatically update the page as items ...
4
votes
0answers
32 views

Disable telemetry spam on Modern UI pages

If you open a modern page, then press F12 and open the network tab you can observe a lot of telemetry-related activities every several seconds. It makes it harder to debug SPFx customizations. Is ...
2
votes
1answer
51 views

HTTPmodule or similar for SharePoint online

Can we build a httpmodule or something similar for SharePoint online? My requirement is to redirect user to custom page when they click on any document link in SharePoint document library or search ...
0
votes
1answer
19 views

MaterialUI packages throwing error in SPFx solution

Environment: SPFx with Office 365 I have created a SPFx solution with 1.8 as @microsoft/sharepoint version. I am trying to utilize material UI. so I have installed npm install @material-ui/core into ...
0
votes
0answers
43 views

Fabric UI DetailsList component - Dynamically load group items

I'm using grouped DetailsList Fabric UI component in custom SPFx webpart for displaying list data. https://developer.microsoft.com/en-us/fabric/#/controls/web/detailslist/grouped I need to load ...
3
votes
1answer
45 views

SPFX Change the position of a ListView Command Set button in the command bar

I created a custom SPFX ListView Command Set button in the command bar which works fine. My only concern is that I don't control his order of appearance in the command bar. My goal is to be able to ...
0
votes
1answer
46 views

Associate Field Customizer with existing field using feature framework

According to Field Customizer documentation it is possible to associate it with existing SharePoint field using feature framework. But I am not able to make it work. I am trying to customize the "Name"...
3
votes
1answer
28 views

PnPJS - MS Graph API - how to get group photo

I am using PnPJS for MS Graph API to retrieve groups information in SPFx solution. I am able to get the groups information properly. I need to get the group photo also, since photo is not available ...
1
vote
1answer
30 views

Changing the URL of “Name” column in document library

Is there any way to rewrite the URL of "Name" column in a document library's modern view? "Field Customizer" is an option but then I will have to hide/delete "Name" column, which is not a good idea ...
1
vote
2answers
35 views

Error: AADSTS65001: The user or administrator has not consented to use the application

I am trying to install webpart with permissions to users and groups in Microsoft Graph. I use "@pnp/graph" to comunicate with Microsoft Graph API. "webApiPermissionRequests": [ { "resource": "...
0
votes
1answer
53 views

People Picker Control in Sharepoint Framework web part (No Javascript Framework)

I am new to SPFx and have a SPFx web part form project with No JavaScript framework option. In this I need to implement a People picker. I need to implement the form both as a new and edit form i.e in ...
0
votes
2answers
46 views

Display Rich Text in SharePoint Online

I am trying to display the rich text in a list item . I tried using the JSON formating, but it does not seem to have any support for "Enhanced rich text". The txtcontent converts the rich text to ...
2
votes
1answer
62 views

spfx office fabric ui CSS is not working

I just now upgraded SPFX from 1.7.1 to 1.8.2. I have referred office fabric UI css class like ms-grid, ms-GridRow, ms-u-md6 etc... before upgrading everything is working fine. But know office fabric ...
0
votes
1answer
32 views

Why I am not able to authenticate with Microsoft Graph Explorer through Sharepoint Custom Web Part only in Edge Browser

I have deployed a custom web part on sharepoint online, in which I am authenticate with Microsoft Graph Explorer. It is authenticated through Sharepoint Custom Web Part successfully in Chrome, IE and ...
1
vote
2answers
53 views

need help on css class to override font size in modern communication site

I am using an SPFX extension listed here: https://github.com/hugoabernier/react-application-injectcss to inject css in modern communication site. I just need to know which css class should I use to ...
0
votes
0answers
28 views

SPFX Conditionally display fields in custom web part (react-list-form)

New to SPFX - I'd like to implement the custom web part react-list-form. Everything looks and works great, except I also need the ability to conditionally show / hide certain fields based on other ...
0
votes
1answer
28 views

Programmatically Deploy SPFx ListViewCommandSet Tenant Wide

I have a SPFx list view command set which is deployed tenant wide. More details here Is it possible to perform the steps mentioned in the article programmatically. Basically I want to upload the ...
1
vote
1answer
58 views

How get sharepoint list items by view(s) in spfx?

I use spfx in version 1.8.2 and I use @pnp/sp already to fetch views, but this gives me only properities of views, but I need items of list with are visible on sharepoint list in those views. sp.web....
0
votes
1answer
32 views

SPFX create and use an array

As a newbie to SPFx, how do I create and use an array? everything I've tried fails to populate the array. let CustomerList: Array<any> = ['1', '2', '3']; let array1: any = ["Panda", "Zebra", "...
0
votes
1answer
24 views

Adding data to window object -

In the webpart I am currently preparing using SPFX I need to assign some user data into window object: (<any>window).userDetails = { displayName: this.context.pageContext.user.displayName,...
0
votes
0answers
32 views

SPFx not rendering correct amount of items after selecting number with slider

I am currently building my RSS webpart in SPFx with React. It is almost ready but I have a problem with rendering the correct amount of items after choosing how many items I want to render. Initially ...
0
votes
1answer
86 views

Getting Minified React error #31 when trying to view SPFx webpart in Internet Explorer 11

We have SPFx webpart on version 1.8.2 using React version 16.7.0. When we test the webpart on Google Chrome it works perfectly fine. But when we test it on Internet Explorer 11 it shows error in ...
0
votes
1answer
48 views

Extract source code from .sppkg file

Is it possible to extract code from a SharePoint Package file? I have a package installed in App Catalog. Is it possible to get the SPFx code from the package file?
0
votes
0answers
28 views

Q: Set Folder's path according to it's title in a list with SPFx

I am creating a folder inside a List with the following code: TypeScript import {sp} from "@pnp/sp"; const shpList = sp.site.rootWeb.lists.getById(ListId); shpList.items.add( { Title: folderName, ...
0
votes
2answers
22 views

Sharepoint online app catalog creation not working (office 365 developer subscription)

I have "Office 365 E3 Developer" license which contains "SharePoint Online for Developer" license. When I go to app catalog creation in SharePoint admin in office 365 SharePoint admin center (classic ...
0
votes
0answers
21 views

Getting only blue color in SPFx even though another color in SCSS

I am having trouble after with getting the desired color in my RSS webpart in SPFx. I get the standard blue from SPFx even though I have specified a background color. This question is related to the ...
1
vote
2answers
74 views

Q: Create list item inside folder with SPFx

I am trying to create an item within a folder in a list. Is there an approach with pnpjs that looks like the following? TypeScript import {sp} from "@pnp/sp"; const shpList = sp.site.rootWeb.lists....
1
vote
2answers
48 views

Problem with changing in the scss file

I am facing problems that I can't change the scss file which is there when you create a SPFx webpart in React. When I try to change color of the webpart nothing happens. I am building an RSS Feed in ...
0
votes
2answers
49 views

Q: Create visible folder in list with SPFx

Having the following code in an application extension: TypeScript import {sp} from "@pnp/sp"; /*******************************************************************/ const shpList = sp.site.rootWeb....
0
votes
0answers
20 views

spfx how to minify files for own CDN

Original question was, whether is it possible to somehow extend the webpack/gulp inside of spfx solution to have an extra task to minify some js files supposed to move to Office365 CDN? I would need ...
2
votes
0answers
28 views

Integrate Azure Bot with SPFX Extension

I want to call my azure bot from sharepoint online site using spfx extension as shown in the example: https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/react-msal-bot Steps/...
0
votes
0answers
15 views

SPFx Package Deployment CSS differs from Workbench

I'm currently experiencing an issue that I'm struggling to get my head around. I have created a custom webpart and styled it using the Office UI Fabric in order to maintain consistency with the theme ...
0
votes
2answers
88 views

Cant get List items when list item count gets over 5000

As the title says, I am using pnp js in a SharePoint online list: here is my code: let list = sp.web.lists.getByTitle("Resource Projection"); let query = `Quarter_x0020_Num eq ${currentQ} and ...
0
votes
0answers
16 views

Debugging react based modern spfx webpart using hosted workbench issues

We have been successful in developing multiple custom modern Web Parts against two tenants ( one used for development and one for build. Until recently the standard debugging method of serving from ...
1
vote
0answers
76 views

(Problem)SPFx rendering items from RSS after selecting number of items you want to display with slider

I am currently building an RSS webpart in SPFx using React as a framework. Now I am in the stage that I want the user to be able to select how many news items he/she want to see with a slider (taken ...
0
votes
2answers
40 views

How to create common scss file in SPFx solution?

I have created SPFx solution which contains multiple webparts (Four webparts in 1 solution). All the webparts design are similar but with different logic. Right now, I have created a duplicate file ...
0
votes
1answer
30 views

how to set like/Unlike in document library using SPfx

Using SharePoint Frame work, I am displaying the image and below it has like button and comments section. When I hit the like button of the particular item image , it should update in the document ...
0
votes
0answers
29 views

Trying to get a File from OneDrive as PDF causes CORS error on redirect

I'm trying to get the content of a file as a pdf from Onedrive, however when getting the File via MSGraphClient, it just returns an error in the browser. MSGraphClient call:client.api(`/me/drive/...