Questions tagged [spfx]

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

4
votes
1answer
592 views

How do I get Terms from termstore using SharePoint Framework?

I want to fetch terms from termstore, in my SharePoint Framework app. I have tried this microsoft sample: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/knockout-taxonomy I ...
1
vote
2answers
24 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": "...
1
vote
1answer
23 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 ...
0
votes
1answer
24 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
28 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
30 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 ...
2
votes
0answers
119 views

Error in Generating HTML Snippet for SPFX Webpart

I have coded a webpart using SPFx framework, and am trying to add the webpart into the page layout to avoid any changes by the users. The site is using Classic Experience, and I have coded the Master ...
1
vote
1answer
430 views

Web part not available to add in the Workbench which is hosted on SharePoint Library

I am building my first SharePoint client-side web part (Hello World part 1). Everything works perfect no issues with the following. Successfully set up Machine with NodeJs, Gulp, Yeoman etc Got the ...
0
votes
1answer
29 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
46 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
1answer
20 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 ...
0
votes
0answers
20 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 ...
1
vote
1answer
31 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....
1
vote
1answer
594 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
23 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", "...
4
votes
2answers
961 views

Asynchrounously load lookup column values in an SPFX/PNP-JS-CORE editform

I'm working on a spfx app to be used as a SharePoint list form. The app will be used to edit ha a LOT of lookup columns. the lookup columns are rendered as dropdowns in the react component. I am ...
5
votes
3answers
8k views

How to retrieve pageContext in SPFx?

I'm following the second tutorial from the SharePoint Framework dev center: Connect to SharePoint It states that you can retrieve details from this.context.pageContext, however this is no longer the ...
0
votes
2answers
43 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
14 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
1answer
51 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
0answers
30 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
0answers
21 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
1answer
22 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
2answers
17 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 ...
1
vote
2answers
44 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
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
47 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....
4
votes
1answer
338 views

Print Files through SPFx/JS?

I would like to build a button which would send a batch of files to the printer when clicked (It can prompt the user. Doesn't need to go to the printer without approval). The files would exist in a ...
4
votes
1answer
907 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
16 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 ...
0
votes
2answers
38 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....
2
votes
0answers
23 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
10 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 ...
1
vote
2answers
92 views

SPFx webpart with Bing Maps

I have SharePoint 2019, and I am trying to create a webpart that will display Bing Map, I tried this on a react app created using create-react-app, and it works fine. Then I took the code, and added ...
1
vote
0answers
73 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
1answer
1k views

WebParts keep loading untill I scroll down the page or perform a zoom

environment:SharePoint online;Sharepoint Framework; Programming languages:TypeScript During page loading, sharepoint custom web part keeps on loading Nothing does change untill I scroll down the ...
0
votes
0answers
11 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 ...
0
votes
2answers
31 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 ...
2
votes
1answer
63 views

MS Graph API - Problems on SPO Mobile-App

The Background: I am developing Sharepoint Online Webparts on-demand. Sometimes the functionality of these Webparts include the use of Microsoft's "Graph-API" to access Data regarding Office 365 ...
0
votes
1answer
29 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
14 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/...
0
votes
0answers
15 views

How to customize a List/Library display in SharePoint Online with the Modern Experience

I have built a custom search on a document library items. The results show items previews (custom built SPFx webpart). By clicking on the item title, I want to take the user to a customized view of ...
0
votes
0answers
10 views

Correct and reliable way to load bootstrap in SPFx webpart

ello, I know there are couple of ways to load bootstrap in our SPFx webpart. But it seems there is some inconsistency on how to add its reference in webpart.ts I am trying to load bootstrap.min.js ...
0
votes
1answer
24 views

SPFx React webpart is not displaying all XML items from RSS News Feed

I am currently building an RSS News Feed in SPFx using React as a framework and using an XML link https://feeds.expressen.se/nyheter/ (Swedish news if curious). I can display all items, in this case ...
0
votes
0answers
15 views

Office UI Fabric not loaded with SharePoint 2016 | SPFx

I have sharepoint 2016, and i am trying to load the property panel of spfx webpart, however it's loaded without fabric icons. For example the Back and Next buttons look like this: Is there a way to ...
4
votes
2answers
656 views

NodeJS not compatible

when I run gulp serve I get the following error. Your dev environment is running NodeJS version v10.15.0 which does not meet the requirements for running this tool. This tool requires a version of ...
2
votes
1answer
198 views

Supported scenario to have web part *and* assets in one SharePoint Framework package?

Expected behavior Going by the tutorials I would expect to be able to make a package that contains some assets, like a list, as well as at least one web part - all in the same package. Observed ...
0
votes
1answer
633 views

403 When trying to add a list item with REST API

I've been trying to get this function to post an item to a Sharepoint list, however it's been coming back as a 403 each time. The formDigest value populates each time I console log it and I can see it ...
0
votes
0answers
7 views

SPFX - PNP Get Termset that is not available for tagging

I have a spfx extension where I need to get terms from a TermSet which is not available for tagging. I am trying to use the terms for custom Footer Navigation Links. Currently I am using PNP JS to ...
0
votes
1answer
19 views

Get another user info using PnPJS with SPFx

I want to get a list of items from a SharePoint list, and display them in a specific way in SPFx webpart. I could use PnPJS to get Text and Number fields, but for the Author field, I am only getting ...