Questions tagged [spfx]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

Using PNP JS with SPFX 1.1

I am using SPFX 1.1 (because our SharePoint Environment is 2016) and tried to integrate PnP (Version 1.3.3). I followed the instructions from here to switch to typescript 2.4.2 instead of 2.2.2 https:...
0
votes
1answer
13 views

What is this strange error: Tuple type element list cannot be empty

Environment: SP2019 onprem SPFx version: 1.4.1 All of sudden below error is coming while doing gulp build or gulp serve. A tuple type element list cannot be empty.Error - typescript - src/...
1
vote
1answer
12 views

SPFX 404 When Trying to Get Current User In Workbench

I'm trying to get the user context in my React webpart and am getting 404's when requesting: https://localhost:4321/_api/web/currentuser This is the part of the code that fetches the current user: ...
0
votes
1answer
22 views

How use result of pnp response

I use PnP for getting SharePoint list item. But I don't really know, how use the result of my function. I wish to get items of my SharePoint list using PnP and assign it to my list. My code don't ...
0
votes
1answer
21 views

Programmatically trigger flow and send properties

I want to manually trigger an external flow from my SPFx project, and at the same time send values to the flow. In flow, I have my request body: { "$schema": "http://json-schema.org/draft-04/schema#...
0
votes
1answer
32 views

What are the supported office UI fabric versions for each SPFx versions?

It is so confusing that some parts of office fabric will not work as expected with different SPFx versions. I have created a SPFx solution for SharePoint 2019 on-Premise. Following things are not ...
0
votes
0answers
10 views

SPFx themes template is loading with 2 seconds delay

How to prepare a code without a delay? When we prepared header with a menu we have about two seconds delay, because the site load first, and next extensions and webparts. How to replace one header ...
0
votes
0answers
19 views

SPFx Solution has a warning stopping production builds has anyone seen it before?

I have been supporting an SPFx solution and I am required to make a small change however it will no longer build. I have tried pulling the last version back down from our repository but it has the ...
0
votes
1answer
32 views

SPFX extension placeholder for search bar

I am trying to add some html elements like radio button below my search bar in communication site i.e. to a modern page using spfx extesion. So initially i tried to do it using javascript by just ...
0
votes
0answers
28 views

How to add Edit webpart button in Teams tab for SPFx like this?

I want this kind of edit web part button in teams tab for installed SPFx web part.
0
votes
1answer
23 views

Got the error in SPFx installation “Yeoman Doctor - Running sanity checks on your system”

Hi All, When I tried to installed the SPFx "npm install -g yo" getting the issues. Tried both "npm install -g yo@latest" and "npm rm -g yo", "npm install -g yo" but it didn't help. Attached the ...
0
votes
0answers
30 views

Sharepoint Online cross site lookup schema.xml for field extension

I try to create a cross site Lookup field extension for Sharepoint Online. The Field extention is working perfectly, as long as both lists are at the same Website but I need it to work cross site. ...
0
votes
0answers
17 views

SPFx re-render web part after Property Pane closes while in DisplayMode.Read

I have a SPFx anchor tag web part that is hidden while the page is in read mode. I'm using DisplayMode.Edit to determine that while the user edits the page and adds the web part. I'm trying to figure ...
0
votes
2answers
24 views

SharePoint Online Documentation

As I mentioned in my first question in this site (Access a document in SharePoint library from Azure functions), I am new in Microsoft's world. In this sense, I am going to work with SharePoint Online ...
0
votes
1answer
22 views

Get the selected item (item id) of SharePoint list (On Premise 2019) with SPFx and React

I am trying to customize the edit form of SharePoint list using web part SPFx. I need to get "item id" of selected item and the send it with query string to new page (custom edit page). have you any ...
0
votes
1answer
37 views

How to render HTML value e.g “<div><div>Go to Google</div><div>Search on spfx react project</div></div>”, in SPFX project using type script?

We have created spfx react project for SharePoint online using type script: Here, props.appendTextDetails value is "Go to GoogleSearch on spfx react project". const FCRichtext = (props:any) => { ...
1
vote
0answers
40 views

SharePoint Modern Custom Footer SPFx Customizer - Multiple scrollbars

We have created a custom footer using SPFx application Customizer to provide information like social media icons, feedback button, site map (html) etc. This is now occupying more than 90% of content ...
0
votes
0answers
17 views

Substring in SharePiont Column Formatting #spfx

I am trying to create a simple "html link" column formatting, by lightly customizing the "mailto link" sample. This gets me close: { "$schema": "https://developer.microsoft.com/json-schemas/sp/...
0
votes
0answers
13 views

Drag n Drop API not working as expected

I am working on a project on which user will drag a text from webpart(e.g. webpart1) & dropping the same text into other webpart(e.g. webpart2) . I am referring This link as reference . Based on ...
1
vote
3answers
27 views

SharePoint Framework Question - New

Can we use SharePoint framework for SharePoint Online as well? or just for on prem?
1
vote
1answer
37 views

Is there a way in SPFx to create custom action in “PersonalAction” group

XML element method is working for classic pages, for modern pages it is not working. Using SPFx list view command set I can create ECB menu for list item level I am unable to find anything for ...
1
vote
0answers
35 views

Cannot install SPFX package using Site Scripts

We've noticed that for starting from July 19 2019, we can no longer install SPFX packages using Site Design. Here is the very minimum sample that replicates the issue: siteDesign.json { "$schema"...
0
votes
1answer
18 views

All of sudden gulp command not recognizing

I made windows update on this Sunday. From that point, I am not able to execute gulp commands. I am not sure if there is any relation between windows update and gulp command. I am getting below error. ...
0
votes
0answers
27 views

SPFx : gulp trust-dev-cert failing with “ERROR_INVALID_ACL”

When I try to install the dev certificate for SPFx I am getting an error: Error - [trust-cert] Error: root "Trusted Root Certification Authorities" Signature matches Public Key CertUtil: -addstore ...
2
votes
1answer
24 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
9 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
22 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
43 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
40 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
31 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
32 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
30 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 ...
1
vote
0answers
47 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
197 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
86 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
88 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
38 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
55 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
23 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
136 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
68 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
66 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
43 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
36 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
38 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
2answers
132 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
89 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
121 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
40 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
62 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 ...