Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [spfx]

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

0
votes
2answers
20 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
27 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
28 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
44 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
17 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
18 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
25 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
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", "...
0
votes
0answers
12 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
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
1answer
43 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
17 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
20 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
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 ...
0
votes
0answers
20 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
43 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
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
2answers
37 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
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 ...
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
9 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
41 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
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 ...
1
vote
0answers
72 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
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 ...
0
votes
1answer
28 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
8 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
14 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 ...
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
0answers
16 views

Issue with rendering XML data in SPFx

I am in a project of making a RSS feed in SPFx and using React.js and TypeScript. When I try to retrieve XML data from a news site, the console gives error: Because it complains about CORS, so I ...
0
votes
1answer
21 views

Does ADAL.js support integrated windows authentication or client credential flow?

I am trying to call Graph API from my SPFx webpart (in SharePoint 2019 on-premise) using ADAL.js. It works fine but user needs to sign-in to Azure AD once. Our on-premise AD is already synched with ...
0
votes
1answer
9 views

Call child component method in parent and visa versa

how can I call a parent components methods from child or visa versa. I'm using reactjs and typescript in spfx webpart. Or should I use helper classes to call methods of another classes from anywhere?...
0
votes
1answer
18 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 ...
0
votes
0answers
9 views

Nic editor issue in Modern site

I have developed custom content editor webpart in spfx using "Nic editor" plugin. The issue is Nic editor plugin does not allow to press enter if we add even a single link in editor(Either from link ...
1
vote
1answer
41 views

Anyone can explain the .ts file and .tsx file use and difference in SPFx react webpart?

In SPFx No JavaScript Framework webpart contain "webpart.ts" file and write code in it. But in React SPFx webpart, there are 2 file : 1) webpart.ts file 2) webpart.tsx file in component folder. ...
1
vote
0answers
15 views

SPFx extensions will work in SharePoint mobile app?

Platform: SharePoint mobile app This question may sounds silly but need a definite answer. I have created multiple SPFx web parts and added them to pages. These are working fine, when I am trying to ...
1
vote
1answer
20 views

Calling a custom web API secured with Azure AD from SharePoint 2019 on-premise

I need to call custom web APIs secured with Azure AD from my SharePoint 2019 on-premise SharePoint Framework solutions. As far as I know, this scenario and calling graph APIs are only supported in ...
0
votes
0answers
27 views

Making a div full screen in SPFx webpart deployed in SharePoint Online

I need to make a div full screen (in web page) and for that I am using CSS. .divFullScreen { display: block; z-index: 9999; position: fixed; width: 100%; height: 100%; top: 0; ...
0
votes
0answers
13 views

List View Command Set custom commands not loading

My SharePoint list is not loading the custom commands when the command set has been added as an app to SharePoint Online. The commands will load correctly if I try them in my 'Developer' site ...
0
votes
0answers
100 views

Show Modal dialog in full page SPFx

I have created a web-part which search the images from library and shows the result. when I click on image it should show in the popup as preview however it shows withing the iframe only instead of ...
0
votes
0answers
21 views

Using Sharepoint PnP to get SchemaXml and use it while provisioning an SPFx List Instance

I am creating an SPFx Web Part that will provision a list instance upon installation. I have successfully created and provisioned a basic list, however i cannot seem to customize it by altering the ...
0
votes
0answers
23 views

Yeoman generator produces an old version of SPFx

I have Yeoman generator (@microsoft/generator-sharepoint) version 1.8.2, I can verify this by running: npm list --depth=0 -g .. When I try to run yo @microsoft/sharepoint , I noticed 2 things: The ...
0
votes
0answers
19 views

Convert SPFx Web Part to 2019 version

I made a relatively simple web-part using the SharePoint online only option but it turns out this will need to be deployed to SharePoint Server 2019. I can't find documentation on how to do this, can ...
1
vote
1answer
73 views

What is difference between SharePoint Framework (SPFx) Extensions and SharePoint Framework (SPFx) Web PART

I have started working on SharePoint Online. Where I have to use SPFX. What is the Difference between SharePoint Framework (SPFx) Web Part and SharePoint Framework (SPFx) Extensions
0
votes
0answers
46 views

SPFx - Using UI Fabric Core Controls without React Framework

Just wanted to check If I am not missing something. I wanted to use Office UI Fabric core controls on SPFx webpart without React component. So basically I have option to use SP Fabric Core. https://...
0
votes
2answers
79 views

Sharepoint online rest api is returning xml instead of json

I have the following code this.context.spHttpClient.get( `${this.absoluteUrl}/?$select=Title&`, this.config, { headers:this.getHeaders, }) .then((response: ...
0
votes
0answers
23 views

PNP.js adding a new SharePoint Group and setting the Group owner

I'm writing a webpart that creates several SharePoint Groups. I'm trying to set the Group Owner so it's not defaulting to the user creating the group. According to documentation, this should be ...