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
0answers
5 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
11 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
8 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
0answers
7 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 ...
-1
votes
0answers
10 views

I want to add pagination to my table usin spfx rest Api [on hold]

.HTMl export default class MatchWebPart extends BaseClientSideWebPart<IMatchWebPartProps> { public render(): void { this.domElement.innerHTML = ` <div class="parentContainer" ...
0
votes
0answers
6 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
26 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
12 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
16 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
18 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
12 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
41 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
18 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
19 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
17 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
47 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
19 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
44 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
19 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 ...
0
votes
1answer
22 views

Unable to load `/temp/manifests.js` on https

On my SharePoint 2016 on-premise development site workbench, to load my SPFx webpart in the config\server.json I have set the "https": false. My development site loads on http and in my browser ...
0
votes
1answer
10 views

spfx Global Term Store without using get

Just wondering whats the best way to get the name of the Global Term store without hard coding it? I have this at the moment var termStoreName = "Taxonomy_xxxxxxxxxxxxxxxxx"; const store: ...
0
votes
0answers
24 views

SPFx TypeScript json response from spHttpClient as array

i want to get data to WebPart from the SharePoint list. but some of the data are eg. PeoplePicker or Multiple line of text and I have result shown as: <div class="...
0
votes
1answer
21 views

SPOnline: After including feature/asset deployment to my SPfx WebPart I can't put it on any SitePage

I'm trying to add some provisioning function to my SPfx WebPart Project on SharePoint Online. The Problem is that as soon as I put the feature information to my package-solution.json the configured ...
0
votes
0answers
6 views

Sharepoint Online Custom App Extension - Create word document based on content type

I'm trying to create a App Extension in Sharepoint Online that creates a new document based on content type. I know that I can create a file using Rest API, I'm just having a difficult time ...
0
votes
1answer
38 views

Reading Sharepoint List in SPFx - ForEach not working

I have no idea how to read Sharepoint List Data in SPFx one by one. JavaSript console returns me an error: Uncaught (in promise) TypeError: item.forEach is not a function. private ReadAllCountries(...
0
votes
1answer
41 views

How to inject custom CSS in Modern Site Pages using SPFx Extensions

I would like to inject Custom css in modern site pages. Here i need to change all the fonts on the modern site and i would like to achieve this via App Customizer with SPFx Extensions. Any tips Or ...
0
votes
0answers
20 views

How to use HoverCard of Office UI Fabric in Custom SPFX People Webpart

How to use HoverCard of Office UI Fabric in Custom SPFX People Webpart? I am developing a custom SPFX webpart where i would like to mimic the behaviour of the current modern 'People' webpart ...
0
votes
0answers
49 views

Implementing discussion board in modern sites using SPFx

Consider we have a page on which list items details are being rendered, one at a time using list item ID passed as query string parameter. I understand that we have the comments section feature ...
3
votes
3answers
86 views

SPFX and pnp/sp : How to get all sites

I am here today to ask you : how do you retrieve all sites on your tenant by using Pnp (formerly known as pnp-js) ? Or even using CSOM. I am trying to create a webpart where, in the PropertyPane, the ...
0
votes
1answer
20 views

Problem adding a Site Script and Site Design at hub

We are trying to create a site design with SharePoint document library with folders and sub folders along with custom permissions. I know how to create a document library but not sure how can i create ...
1
vote
2answers
108 views

Get current user's user group in SPFx WebPart

How do I get the current user's groups which he is a part of without @pnp/sp js framework in SPFx ?
1
vote
1answer
25 views

Shared tenant different header

AS-IS: There is a group of companies, every company (exclude one) have the same brand (same colors, names, ...), but this one company (our) have different brand (e.g. wecare, with different colors, .....
2
votes
1answer
40 views

“Save for later” for articles and publishing pages, where does it save?

I'm planning to make a custom web part that using the users articles/pages that they have "saved for later". However, I have no clue to WHERE to get this information, or where its stored. The "save ...
0
votes
1answer
14 views

Add column names dynamically to `select` method in SP PnP JS

In the select method of SP PnP JS how can I add column names dynamically? For e.g. can the below code sp.web.lists.getByTitle("My List").items.select("Col1", "Col2"); be written something like this ...
3
votes
1answer
39 views

Creating component in SPFx webpart from command line

Is there any way to generate component in React from command line (similar to Angular's ng generate)?
0
votes
0answers
12 views
1
vote
1answer
24 views

Use custom Feature Icon for SPFx

Is there a way to use a custom icon for SharePoint Framework features? When we navigate to the Site Settings, it would be nice to see our branded icon instead of the default one. Part of thepackage-...
1
vote
0answers
15 views

“Likescount” and “CommentCount” returns null from publishing pages

I have a search function that connects to "LikesCount" and "CommentCount"properties (social bar). Example: let localQuery = SearchQueryBuilder.create('', {TrimDuplicates: false}) ...
6
votes
0answers
162 views

Automatically deploy SPFx app on new site collections in SharePoint 2019

I have SPFx app that contains an Application Customizer. I would like to have this app either a) deployed tenant wide or b) automatically added to a site collection when it is created For a) there ...
0
votes
0answers
22 views

Creating new items in sharepoint list with SPFx

I am building an web part in sharepoin online that render data from a list. All the rendering is working fine, now I want to go to the next level and allow the user create new items direct from the ...
0
votes
0answers
10 views

Best practice to provision assets (e.g. custom lists) alongside a SPFx tenant-wide Web Part?

Microsoft says that it's not possible to provision assets with a Web Part which is deployed tenant-wide (See here) But I need to develop a Web Part which will be available on the SharePoint Online ...
0
votes
1answer
38 views

SPFx web part: wait for fetching data before rendering header

I already asked this question regarding SPFx extensions. But now I have the same problem I had in that question, but for a SPFx Web part. I use the exact same _getUserInformation() method as ...
0
votes
0answers
22 views

Scope SPFx Extension Application Customizer to Site Pages library SharePoint Online

I have wrote a SPFx Extention (SharePoint Online) to inject some css into site and is there any way to scope this out only for pages created from Site Pages library. Currently i have applied the ...
1
vote
0answers
36 views

SharePoint authentication - Web api

Goodnight, I have a site in Sharepoint 2019 with a webpart spfx and I have a site where a web api runs with the business logic. The api has Windows authentication From SharePoint I can connect to ...
0
votes
1answer
22 views

ADFS custom claims with SPFx

Anyone using SPFx on SP 2016 with ADFS custom claims. We seem to have an issue with custom claims. Some claims are working others are not E.g. the list has two roles 1: General role 2. ...
0
votes
0answers
11 views

How to passd acordion a properties in SPFx

I creating acordeon from this article: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/add-jqueryui-accordion-to-web-part But there are two files. I cant pass properties ...
0
votes
1answer
21 views

Get current view on the page

Im trying to get current view on SPFX extension but i dont know the code.. I know we can get the current list by this.context.pageContext.list.title Is ther somethig like this for view??
1
vote
1answer
31 views

How to test PNP using JEST?

Is there any way to mock the context of the webpart since i need it to be able to make a request through pnp ?
0
votes
1answer
37 views

SPFx Extension - modern experience for search results.aspx

I want to create a header in a modern site page. The header will have SharePoint search (similar to communication sites). After clicking on search, we will be landed on results.aspx page. Now in this ...
0
votes
1answer
42 views

Missing SPFX webpart on SP2016 subsites

Missing web part from the add a web part group on sub site pages. I deployed web part to the app catalog and CDN. I’m able to use it on the top level of my website without any issues, but I can’t get ...